Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No errors given for unauthorized 401 #1

Closed
darrenparkinson opened this issue Aug 30, 2018 · 3 comments
Closed

No errors given for unauthorized 401 #1

darrenparkinson opened this issue Aug 30, 2018 · 3 comments

Comments

@darrenparkinson
Copy link

Hi Jose,

I was just using this SDK and I noticed that when I get a 401, I don't seem to get any indication of it so I'm unable to provide any feedback. Is that something you might change?

Many thanks,
Darren.

@jbogarin
Copy link
Owner

Darren,

Every call returns a resty.Response object. You can get the HTTP StatusCode using something like:

newRoom, response, err := Client.Rooms.CreateRoom(roomRequest)
response.StatusCode()

Is that good enough or are you looking for something else?

@darrenparkinson
Copy link
Author

Ah sorry about that. I should have realised. Really sorry. Does resty provide much extra over the net/http library?

@jbogarin
Copy link
Owner

Honestly, not really sure if it provides extra info or not. I used it because it was easier to make the requests, however at the end of the day, I think you can still access the net/http info if you need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants