How to fix HTTP in Julia with "type Regex has no field match_data" error?

Viewed 61

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 Answers

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?

Related