mrjones / oauth

OAuth 1.0 implementation in go (golang).
http://www.mrjon.es
MIT License
269 stars 119 forks source link

Return HTTP response even on non-2XX responses. Clients might want it. #9

Closed deet closed 11 years ago

deet commented 11 years ago

For https://github.com/mrjones/oauth/issues/8

mrjones commented 11 years ago

Thanks!!

deet commented 11 years ago

You're welcome! Thanks for the library.

And sorry for the two issues instead of one.

I've run into some other issues with using this function and those that return its result, and I'm not sure how they should be addressed. (Let me know if you want this as a separate issue.) Specifically, clients can't determine whether the call failed due to network error or because of something application-level (like non-2XX response). So far it seems necessary to do a substring match for "HTTP response is not 200/OK as expected" to determine that the call failed due to a server response. Any suggestions?

mrjones commented 11 years ago

( FYI: Moved this to a new issue. See the discussion in #11 )