The HeadersInterface has a get() function that returns the value of a header, or null.
Headers with the same name can appear multiple times. If this happens, this function will concatenate headers with ,. This is perfectly legal as in HTTP it's always possible to merge multiple headers with the same name as one.
However, sometimes its useful to get every 'instance' of a header, and not have curveball concatenate them.
We should add a getMany(headerName: string): string[] that returns 0 or more headers.
The HeadersInterface has a
get()
function that returns the value of a header, or null.Headers with the same name can appear multiple times. If this happens, this function will concatenate headers with
,
. This is perfectly legal as in HTTP it's always possible to merge multiple headers with the same name as one.However, sometimes its useful to get every 'instance' of a header, and not have curveball concatenate them.
We should add a
getMany(headerName: string): string[]
that returns 0 or more headers.