-
Notifications
You must be signed in to change notification settings - Fork 72
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
Use go's http.Headers, http.Request and url.Values types #3
Comments
…onse primitives. Also updated example usage in the README.
@thinkingserious is this still up for grabs ? |
Hi @vedhavyas, I'm not sure if @willmadison is still working on this. With Best Regards, Elmer |
I've been done with this since last Octoberfest. I was blocked by some other merge holding this one up. |
Since there has been no activity on this issue since March 1, 2020, we are closing this issue. Please feel free to reopen or create a new issue if you still require assistance. Thank you! |
Hi @thinkingserious, here are a few things I noticed:
map[string]string
. Why not use the stdlibhttp.Headers
for that instead?rest.Request
type is similar to the stdlibhttp.Request
type. Using the stdlib types could make the library more easy to integrate with other code. If you do that, thenmap[string]string
, usually in Go code this is done with theurl.Values
typeThis code doesn't require a type assertion:
You can do this instead:
The only difference I see between the stdlib HTTP client and this one is that it returns a string for the response body instead of an io.Reader. Otherwise the overall level of complexity feels about the same as the stdlib client.
The text was updated successfully, but these errors were encountered: