Skip to content

Commit c008bf4

Browse files
committed
Base.@kwdef does not like subtyping on Julia-1.0
1 parent 18b93ca commit c008bf4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/utilities/request.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ An `HTTPBackend` can hold default `http_options::AbstractDict{Symbol,<:Any}`
88
to pass to HTTP.jl, which can be overwritten per-request by any `http_options`
99
supplied there.
1010
"""
11-
Base.@kwdef struct HTTPBackend <: AbstractBackend
12-
http_options::AbstractDict{Symbol,<:Any}=LittleDict{Symbol,String}()
11+
struct HTTPBackend{T<:AbstractDict{Symbol,<:Any}} <: AbstractBackend
12+
http_options::T
1313
end
1414

15+
HTTPBackend() = HTTPBackend(LittleDict{Symbol,String}())
16+
1517
const DEFAULT_BACKEND = Ref{Union{Nothing, AbstractBackend}}(HTTPBackend())
1618

1719
Base.@kwdef mutable struct Request

0 commit comments

Comments
 (0)