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

make http client based get requests work again #232

Merged
merged 1 commit into from
Apr 16, 2018

Conversation

amanica
Copy link
Contributor

@amanica amanica commented Apr 10, 2018

hi,
after struggling quite a bit with the new version of HTTP.jl (and julia 0.6.2) I finally figured out that the query parameters gets ignored when calling via the Client api. (I think a similar issue exists with HTTP.get function and friends)

With this fix it is working for me again. Let me know if you are happy with this and if I should attempt to add a test..

thanks
marius

@quinnj quinnj requested a review from samoconnor April 11, 2018 03:26
@quinnj
Copy link
Member

quinnj commented Apr 11, 2018

Looks good to me, but @samoconnor implemented this code path, so let's let him look at it.

@samoconnor
Copy link
Contributor

This change looks good to me in the context of client.jl.

However, I think it might be time to deprecate client.jl and encourage people to use kw args like this: #192 (comment)

As it stands, the request(client::Client ... method exists as a place to implement all the deprecation messages for kw args that changed in v0.6. The only thing remaining in struct Client (aside form the kw args NamedTuple) is the cookiejar. But cookiejar= is really just a kw option like all the others, there isn't a compelling reason for it to have its own special field.

Note: default_cookie_jar handles the common case where the user just wants a single cookiejar per Julia session, so DEFAULT_CLIENT.cookies is redundant.

Also, HTTP.get(url) being routed through client.jl is a bug/oversight (a multiple dispatch gotcha).
It is intended to go to here: https://github.com/JuliaWeb/HTTP.jl/blob/master/src/HTTP.jl#L337

@samoconnor
Copy link
Contributor

This commit addresses the routing of HTTP.get(url) though client.jl: 5d5614c
(@quinnj can you do a quick sanity check?)

@samoconnor samoconnor merged commit 5daa105 into JuliaWeb:master Apr 16, 2018
@amanica amanica deleted the client_request_merge branch April 17, 2018 22:07
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

Successfully merging this pull request may close these issues.

3 participants