-
Notifications
You must be signed in to change notification settings - Fork 181
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
HTTP.request with body::Vector{Any} throws an exception #895
Comments
eduartos
changed the title
HTTP.request with body::Vector{UInt8} throws an exception
HTTP.request with body::Vector{Any} throws an exception
Jul 26, 2022
I also get a similar error. Here is a MWE (I need to run it twice to get the error): body =
"""
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?verb ?obj
WHERE {
rh:11844 ?verb ?obj .
}
"""
r = HTTP.request(
"POST",
endpoint_url,
[
"Accept" => "application/sparql-results+json",
"Content-type" => "application/x-www-form-urlencoded",
],
Dict("query" => body),
) with error: julia> r = HTTP.request(
"POST",
endpoint_url,
[
"Accept" => "application/sparql-results+json",
"Content-type" => "application/x-www-form-urlencoded",
],
Dict("query" => body),
)
ERROR: MethodError: no method matching ismarked(::Dict{String, String})
Closest candidates are:
ismarked(::Base.AbstractPipe) at io.jl:427
ismarked(::Base.LibuvStream) at stream.jl:1458
ismarked(::TranscodingStreams.TranscodingStream) at C:\Users\stelmo\.julia\packages\TranscodingStreams\IVlnc\src\stream.jl:202
... I am in Julia v1.8.0-rc3 and HTTP v1.2.0. |
quinnj
added a commit
that referenced
this issue
Aug 16, 2022
I've accumulated some of these while updating packages around the ecosystem. They include: * Fix for #895 * Allow forcing decompression by passing `decompress=true`, this can be handy when you want to decompress, but you don't get the `Content-Encoding` header back * In our `@client` macro, allowing `open` form request as well
quinnj
added a commit
that referenced
this issue
Aug 16, 2022
I've accumulated some of these while updating packages around the ecosystem. They include: * Fix for #895 * Allow forcing decompression by passing `decompress=true`, this can be handy when you want to decompress, but you don't get the `Content-Encoding` header back * In our `@client` macro, allowing `open` form request as well
Fixed in #904 |
Thank you very much!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Versions
Sending a request with
body = Vector{Any}()
throws an exception:The text was updated successfully, but these errors were encountered: