Skip to content

Using Dict for headers precludes repeated headers. #108

@samoconnor

Description

@samoconnor

Following on from #102 ...

A remaining minor concern is that the standard allows multiple repeated headers with the same name, and requires that their order is preserved. See https://stackoverflow.com/a/4371395

Perhaps Vector{Pair} should be allowed.

We could just allow any headers where [String(k) => String(v) for (k, v) in headers] is valid?
e.g.

function f(foo, bar, headers::Vector{Pair{String,String}})
    ...
end

function f(foo, bar, headers) = f(foo, bar, [String(k) => String(v) for (k, v) in headers]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions