Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/HttpCommon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,17 @@ headers() = Dict{String,String}([
@compat typealias HttpData Union(Vector{UInt8}, String)
asbytes(r::ByteString) = r.data
asbytes(r::String) = asbytes(bytestring(r))
asbytes(r) = convert(Vector{UInt8}, r)
asbytes(r) = @compat convert(Vector{UInt8}, r)


type Request
method::String
resource::String
headers::Headers
data::Vector{UInt8}
data::@compat(Vector{UInt8})
uri::URI
end
Request() = Request("", "", Dict{String,String}(), Vector{UInt8}(), URI(""))
Request() = Request("", "", Dict{String,String}(), @compat(Vector{UInt8}()), URI(""))
Request(method, resource, headers, data) = Request(method, resource, headers, data, URI(""))

function show(io::IO, r::Request)
Expand Down Expand Up @@ -211,7 +211,7 @@ type Response
status::Int
headers::Headers
cookies::Cookies
data::Vector{UInt8}
data::@compat(Vector{UInt8})
finished::Bool
# The history of requests that generated the response. Can be greater than
# one if a redirect was involved.
Expand Down