Skip to content
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

Minor type mismatch for HTTP.Response.status #734

Closed
green-nsk opened this issue Jul 22, 2021 · 1 comment · Fixed by #742
Closed

Minor type mismatch for HTTP.Response.status #734

green-nsk opened this issue Jul 22, 2021 · 1 comment · Fixed by #742

Comments

@green-nsk
Copy link

r = HTTP.Response(123) # works fine
HTTP.Response(r.status)
# ERROR: BoundsError: attempt to access Int16 at index [2]

I think this is happening due to HTTP.Request constructor requiring Int64:

function Response(status::Int, headers=[]; body=UInt8[], request=nothing)

Julia 1.6.1
HTTP.jl 0.9.2
MbedTLS.jl 1.0.3 -- Please specify versions

@fredrikekre
Copy link
Member

Seems like that could just be relaxed to Integer. Do you want to submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants