-
Notifications
You must be signed in to change notification settings - Fork 177
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
[Question] How can I run HTTP.get in REPL with response? #898
Comments
When you say you're "cancelling" the request, what do you mean? Are you entering ctrl + C to interrupt the |
I entered Ctrl + c to interrupt it. |
Hmm, I don't see any issues. julia> using HTTP
julia> @time r = HTTP.get("http://dog.ceo/api/breeds/list/all")
3.383419 seconds (12.76 M allocations: 633.043 MiB, 5.91% gc time, 94.27% compilation time)
HTTP.Messages.Response:
"""
HTTP/1.1 200 OK
Date: Tue, 02 Aug 2022 14:37:16 GMT
Content-Type: application/json
Content-Length: 948
Connection: keep-alive
X-Powered-By: PHP/7.3.31
Access-Control-Allow-Origin: *
Content-Encoding: gzip
Via: 1.1 varnish (Varnish/6.3), 1.1 varnish (Varnish/6.3)
Cache-Control: max-age=1800
X-Cache-Age: 2891
X-Cache-Hits: 826
X-Cache: HIT
Accept-Ranges: bytes
Age: 0
Vary: Accept-Encoding
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=EN0fbSCkHl3gKo%2FfyLiaGDyxbWAbmDkV3bwoHgaEafCKCAaVE8Tilu6%2BQt%2FXRqOQWLldegerKNPUMeqpXZcu%2BUJL%2FdfUjCnhNZUotxvDtm4j1hrWesP0WqK5"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: 73478cf39fa65b7a-FRA
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
{"message":{"affenpinscher":[],"african":[],"airedale":[],"akita":[],"appenzeller":[],"australian":["shepherd"],"basenji":[],"beagle":[],"bluetick":[],"borzoi":[],"bouvier":[],"boxer":[],"brabancon":[],"briard":[],"buhund":["norwegian"],"bulldog":["boston","english","french"],"bullterrier":["staffordshire"],"cattledog":["australian"],"chihuahua":[],"chow":[],"clumber":[],"cockapoo":[],"collie":["border"],"coonhound":[],"corgi":["cardigan"],"cotondetulear":[],"dachshund":[],"dalmatian":[],"dane":["great"],"deerhound":["scottish"],"dhole":[],"dingo":[],"doberman":[],"elkhound":["norwegian"],"entlebucher":[],"eskimo":[],"finnish":["lapphund"],"frise":["bichon"],"germanshepherd":[],"greyhound":["italian"],"groenendael":[],"havanese":[],"hound":["afghan","basset","blood","english","ibizan","plott","walker"],"husky":[],"keeshond":[],"kelpie":[],"komondor":[],"kuvasz":[],"labradoodle":[],"labrador":[],"leonberg":[],"lhasa":[],"malamute":[],"malinois":[],"maltese":[],"mastiff":["bull","english
⋮
2130-byte body
"""
julia> @time r = HTTP.get("http://dog.ceo/api/breeds/list/all")
0.090089 seconds (17.83 k allocations: 876.271 KiB, 8.44% compilation time)
HTTP.Messages.Response:
""" Note that the 1st time |
Thanks you for quick reply. Now I have better understanding of how I think I should close my question in here. |
Environment:
I'm new with julia and try to use this package to learn about HTTP request.
In python REPL, I can type:
to take the data, but in Julia REPL when trying to type equivalent code, the REPL seems doing something and not respond to me and I have to cancel it.
bandicam.2022-08-02.21-00-50-981.mp4
The text was updated successfully, but these errors were encountered: