2

Error with HTTP Request

As the above picture shows, my HTTP package does not seem to work. I don't know why. My Julia version is 1.6.2 and HTTP is 0.9.

1
  • 1
    Please provide your code and error outputs as text. Commented Aug 24, 2021 at 9:09

1 Answer 1

0

I am unable to reproduce this with Julia 1.6 and HTTP 0.9.13. I get the following:

julia> using HTTP

julia> HTTP.request("GET", "https://httpbin.org/ip")
HTTP.Messages.Response:
"""
HTTP/1.1 200 OK
Date: Wed, 25 Aug 2021 14:43:31 GMT
Content-Type: application/json
Content-Length: 30
Connection: keep-alive
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

{
  "origin": "73.162.4.15"
}
"""

From what I can tell, this is version issue (per here: https://discourse.julialang.org/t/http-request-error/52716). Can you try doing ] up HTTP to make sure you are on the latest version?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.