Module
Node.Http2.Headers
- Package
- purescript-node-http2
- Repository
- purescript-node/purescript-node-http2
#mkHeadersI Source
mkHeadersI :: forall insensitive. Record insensitive -> Headers
Makes an Headers
value where all headers are insensitive.
#mkHeaders Source
mkHeaders :: forall insensitive sensitive all. Union insensitive sensitive all => Nub all all => Record insensitive -> Record sensitive -> Headers
Makes an Headers
value containing both insensitive headers (first argument)
and sensitive headers (second argument).
mkHeaders { ":method": "GET" } { "sensitive-header": "secret" }
Note: the Union
and Nub
constraints simply prove that labels in one record
do not appear in the other one.
#unsafeToObject Source
unsafeToObject :: Headers -> Object String
Note: this is unsafe because
- a server response's ":status" pseudo header's value will have type
Int
, notString
- a server response's "set-cookie" header's value will have type
Array String
, notString
See https://nodejs.org/dist/latest-v18.x/docs/api/http2.html#headers-object
#printHeaders Source
printHeaders :: Headers -> String