Module
Node.HTTP.Client
- Package
- purescript-node-http
- Repository
- purescript-node/purescript-node-http
This module defines low-level bindings to the Node HTTP client.
#RequestOptions Source
data RequestOptions
The type of HTTP request options
#path Source
path :: Option RequestOptions String
The request path, including query string if appropriate.
#rejectUnauthorized Source
rejectUnauthorized :: Option RequestOptions Boolean
Is cert verified against CAs
#family Source
family :: Option RequestOptions RequestFamily
IP address family to use when resolving hostname
.
Valid values are IPV6
and IPV4
#requestAsStream Source
requestAsStream :: forall r eff. Request -> Writable r (http :: HTTP | eff)
Create a writable stream from a request object.
#responseAsStream Source
responseAsStream :: forall w eff. Response -> Readable w (http :: HTTP | eff)
Create a readable stream from a response object.
#httpVersion Source
httpVersion :: Response -> String
Get the request HTTP version
#responseHeaders Source
responseHeaders :: Response -> StrMap String
Get the response headers as a hash Cookies are not included and could be retrieved with responseCookies
#responseCookies Source
responseCookies :: Response -> Maybe (Array String)
Get the response cookies as Just (Array String) or Nothing if no cookies
#statusCode Source
statusCode :: Response -> Int
Get the response status code
#statusMessage Source
statusMessage :: Response -> String
Get the response status message
- Modules
- Node.
HTTP - Node.
HTTP. Client