-
Notifications
You must be signed in to change notification settings - Fork 175
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
Can you give an example how to use cookie in http request? #360
Comments
I have the same request. I have been using the Julia package Requests.jl but need to convert to HTTP.jl. This involve translating legacy client code that uses using Requests.jl. using Request Where 'response' is the response from the server, url is the URL to the server, "NAME" is the name of a cookie stored locally and "value" is the value of that cookie. I figured that HTTP.jl uses HTTP.CookieRequest.default_cookiejar, that seems to be a Dict. I did some experiments, and it seems like the key in this Dict is the server address (=url?) and the values is a list of cookies defined as HTTP.Cookies.Cookie("NAME", "value"). However, it is impossible for me to get this working, so an example the mimic the Request.jl code listed above would be highly appreciated. Julia 0.7 and 1.0 |
Hi @kopes18 and @kvantitative, I've added the ability, like Requests.jl, to pass |
I want to use custom cookies when http request, cant find any doc demonstrate this.
Julia 1
HTTP.jl 0.6.15
The text was updated successfully, but these errors were encountered: