Skip to content

Commit

Permalink
Fix Response with single status constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Jun 14, 2024
1 parent 65af81a commit b085ed5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/HTTP2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ end

Response(body=UInt8[]) = Response(0, Header[], body, RequestMetrics())
Response(status::Integer, body) = Response(status, Header[], Vector{UInt8}(string(body)), RequestMetrics())
Response(status::Integer) = Response(status, Header[], Vector{UInt8}(), RequestMetrics())

print_response(io::IO, r::Response) = print_response(io, r.status, r.headers, r.body)
function Base.show(io::IO, r::Response)
Expand Down

0 comments on commit b085ed5

Please sign in to comment.