Skip to content

Commit

Permalink
Update deprecated typealias (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
musm authored and tkelman committed Mar 10, 2017
1 parent 662becf commit 8e0ddc5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/HttpCommon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ __precompile__()
module HttpCommon

using Compat
import Compat: UTF8String
import URIParser: URI, unescape
using Compat: UTF8String
using URIParser: URI, unescape

export Headers, Request, Cookie, Response,
escapeHTML, parsequerystring
export Headers, Request, Cookie, Response, escapeHTML, parsequerystring


# All HTTP status codes, as a Dict of code => description
Expand All @@ -18,7 +17,7 @@ include("status.jl")
"""
`Headers` represents the header fields for an HTTP request.
"""
typealias Headers Dict{AbstractString,AbstractString}
const Headers = Dict{AbstractString,AbstractString}
headers() = Headers(
"Server" => "Julia/$VERSION",
"Content-Type" => "text/html; charset=utf-8",
Expand Down Expand Up @@ -94,7 +93,7 @@ type Response
end
# If a Response is instantiated with all of fields except for `finished`,
# `finished` will default to `false`.
typealias HttpData Union{Vector{UInt8}, AbstractString}
const HttpData = Union{Vector{UInt8}, AbstractString}
Response(s::Int, h::Headers, d::HttpData) =
Response(s, h, Dict{UTF8String, Cookie}(), d, Nullable(), Response[], false, Request[])
Response(s::Int, h::Headers) = Response(s, h, UInt8[])
Expand Down

0 comments on commit 8e0ddc5

Please # to comment.