I have just updated to Julia 1.11.1 and HTTP is now returning an error, where it worked before the update. Any thoughts would be appreciated.
The call is very simple:
resp = HTTP.request("GET", "http://httpbin.org/ip")
This code returns the following:
"name": "MethodError",
"message": "MethodError: Cannot `convert` an object of type
SubArray{UInt8,1,Memory{UInt8},Tuple{UnitRange{Int64}},true} to an object of type
SubArray{UInt8,1,Vector{UInt8},Tuple{UnitRange{Int64}},true}
The function `convert` exists, but no method is defined for this combination of argument types.
Closest candidates are:
SubArray{T, N, P, I, L}(::Any, !Matched::Any, !Matched::Any, !Matched::Any) where {T, N, P, I, L}
@ Base subarray.jl:19
convert(::Type{T}, !Matched::T) where T
@ Base Base.jl:126
convert(::Type{T}, !Matched::LinearAlgebra.Factorization) where T<:AbstractArray
@ LinearAlgebra /Applications/Julia-1.11.app/Contents/Resources/julia/share/julia/stdlib/v1.11/LinearAlgebra/src/factorization.jl:104
...
",
"stack": "MethodError: Cannot `convert` an object of type
SubArray{UInt8,1,Memory{UInt8},Tuple{UnitRange{Int64}},true} to an object of type
SubArray{UInt8,1,Vector{UInt8},Tuple{UnitRange{Int64}},true}
The function `convert` exists, but no method is defined for this combination of argument types.
Closest candidates are:
SubArray{T, N, P, I, L}(::Any, !Matched::Any, !Matched::Any, !Matched::Any) where {T, N, P, I, L}
@ Base subarray.jl:19
convert(::Type{T}, !Matched::T) where T
@ Base Base.jl:126
convert(::Type{T}, !Matched::LinearAlgebra.Factorization) where T<:AbstractArray
@ LinearAlgebra /Applications/Julia-1.11.app/Contents/Resources/julia/share/julia/stdlib/v1.11/LinearAlgebra/src/factorization.jl:104
...
Stacktrace:
[1] readuntil(buf::IOBuffer, find_delimiter::typeof(HTTP.Parsers.find_end_of_header))
@ HTTP.IOExtras ~/.julia/packages/HTTP/aTjcj/src/IOExtras.jl:139
[2] readuntil(t::HTTP.ConnectionPool.Transaction{MbedTLS.SSLContext}, f::Function, sizehint::Int64)
@ HTTP.ConnectionPool ~/.julia/packages/HTTP/aTjcj/src/ConnectionPool.jl:296
[3] readuntil(t::HTTP.ConnectionPool.Transaction{MbedTLS.SSLContext}, f::Function)
@ HTTP.ConnectionPool ~/.julia/packages/HTTP/aTjcj/src/ConnectionPool.jl:292
[4] readheaders(io::HTTP.ConnectionPool.Transaction{MbedTLS.SSLContext}, message::HTTP.Messages.Response)
@ HTTP.Messages ~/.julia/packages/HTTP/aTjcj/src/Messages.jl:537
[5] startread(http::HTTP.Streams.Stream{HTTP.Messages.Response, HTTP.ConnectionPool.Transaction{MbedTLS.SSLContext}})
@ HTTP.Streams ~/.julia/packages/HTTP/aTjcj/src/Streams.jl:170
[6] macro expansion
@ ~/.julia/packages/HTTP/aTjcj/src/StreamRequest.jl:67 [inlined]
[7] macro expansion
@ ./task.jl:498 [inlined]
[8] request(::Type{StreamLayer{Union{}}}, io::HTTP.ConnectionPool.Transaction{MbedTLS.SSLContext}, req::HTTP.Messages.Request, body::Vector{UInt8}; reached_redirect_limit::Bool, response_stream::Nothing, iofunction::Nothing, verbose::Int64, kw::@Kwargs{})
@ HTTP.StreamRequest ~/.julia/packages/HTTP/aTjcj/src/StreamRequest.jl:57
[9] request(::Type{ConnectionPoolLayer{StreamLayer{Union{}}}}, url::URIs.URI, req::HTTP.Messages.Request, body::Vector{UInt8}; proxy::Nothing, socket_type::Type, reuse_limit::Int64, kw::@Kwargs{iofunction::Nothing, reached_redirect_limit::Bool})
@ HTTP.ConnectionRequest ~/.julia/packages/HTTP/aTjcj/src/ConnectionRequest.jl:108
[10] request(::Type{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}, ::URIs.URI, ::Vararg{Any}; kw::@Kwargs{iofunction::Nothing, reached_redirect_limit::Bool})
@ HTTP.ExceptionRequest ~/.julia/packages/HTTP/aTjcj/src/ExceptionRequest.jl:19
[11] (::Base.var\"#106#108\"{Base.var\"#106#107#109\"{ExponentialBackOff, HTTP.RetryRequest.var\"#2#3\"{Bool, HTTP.Messages.Request}, typeof(HTTP.request)}})(::Type, ::Vararg{Any}; kwargs::@Kwargs{iofunction::Nothing, reached_redirect_limit::Bool})
@ Base ./error.jl:300
[12] request(::Type{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}, url::URIs.URI, req::HTTP.Messages.Request, body::Vector{UInt8}; retries::Int64, retry_non_idempotent::Bool, kw::@Kwargs{iofunction::Nothing, reached_redirect_limit::Bool})
@ HTTP.RetryRequest ~/.julia/packages/HTTP/aTjcj/src/RetryRequest.jl:44
[13] request(::Type{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}, method::String, url::URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; http_version::VersionNumber, target::String, parent::Nothing, iofunction::Nothing, kw::@Kwargs{reached_redirect_limit::Bool})
@ HTTP.MessageRequest ~/.julia/packages/HTTP/aTjcj/src/MessageRequest.jl:66
[14] request(::Type{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}, method::String, url::URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; kw::@Kwargs{reached_redirect_limit::Bool})
@ HTTP.BasicAuthRequest ~/.julia/packages/HTTP/aTjcj/src/BasicAuthRequest.jl:28
[15] request(::Type{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}, method::String, url::URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}; redirect_limit::Int64, forwardheaders::Bool, kw::@Kwargs{})
@ HTTP.RedirectRequest ~/.julia/packages/HTTP/aTjcj/src/RedirectRequest.jl:28
[16] request(::Type{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}, method::String, url::URIs.URI, headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8})
@ HTTP.RedirectRequest ~/.julia/packages/HTTP/aTjcj/src/RedirectRequest.jl:18
[17] request(::Type{TopLayer{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}}, ::String, ::Vararg{Any}; kwargs::@Kwargs{})
@ HTTP.TopRequest ~/.julia/packages/HTTP/aTjcj/src/TopRequest.jl:15
[18] request(::Type{TopLayer{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}}, ::String, ::URIs.URI, ::Vector{Pair{SubString{String}, SubString{String}}}, ::Vector{UInt8})
@ HTTP.TopRequest ~/.julia/packages/HTTP/aTjcj/src/TopRequest.jl:15
[19] request(method::String, url::String, h::Vector{Pair{SubString{String}, SubString{String}}}, b::Vector{UInt8}; headers::Vector{Pair{SubString{String}, SubString{String}}}, body::Vector{UInt8}, query::Nothing, kw::@Kwargs{})
@ HTTP ~/.julia/packages/HTTP/aTjcj/src/HTTP.jl:330
[20] request (repeats 2 times)
@ ~/.julia/packages/HTTP/aTjcj/src/HTTP.jl:328 [inlined]
[21] get(a::String)
@ HTTP ~/.julia/packages/HTTP/aTjcj/src/HTTP.jl:407
[22] top-level scope
@ ~/Programming/Julia/energy/jl_notebook_cell_df34fa98e69747e1a8f8a730347b8e2f_W2sZmlsZQ==.jl:3"
}