HTTP.jl. Can I get r::Request object before HTTP.request()

Hello, can I get r::Request object before HTTP.request() ?

now only:

import HTTP
response = HTTP.request("GET", "https://docs.julialang.org/")
request = response.request

somewhere about:

import HTTP
request = ... ? 
response = HTTP.request("GET", "https://docs.julialang.org/")
request.response = response
response.request == request  # => true

We currently don’t really expose the Request object as part of the public API. I think there’s an open issue though about making it more official so you could construct, then make a request on your object explicitly.

1 Like