Std.Http
104 public declarations
- allowsBody
&Std.Http.Status -> BoolWhether a status is defined to carry no body, whatever the headers say.
- base64
Str -> StrText encoded as base64, without line breaks.
- basicAuth
Str -> Str -> StrA user name and password written as a basic authorization value.
- bearerAuth
Str -> StrA bearer token written as an authorization value.
- contentLength
&Array[(Str, Str)] -> Option[Int]The length a `content-length` header reports, or `None`.
- Cookie
A cookie as a request carries it: a name and a value.
- endToEnd
&Array[(Str, Str)] -> Array[(Str, Str)]The headers a proxy may forward, with the connection's own removed.
- expectsBody
&Std.Http.Method -> BoolWhether a method carries a body describing what to do.
- hasHeader
&Array[(Str, Str)] -> Str -> BoolWhether a header is present.
- header
&Array[(Str, Str)] -> Str -> Option[Str]The first value given for a header, matched without regard to case.
- headerAccept
StrThe header names the protocol defines, so a caller never spells one wrong.
- headerAcceptCharset
StrThe character sets a client will accept.
- headerAcceptEncoding
StrThe content codings a client will accept, such as gzip.
- headerAcceptLanguage
StrThe languages a client prefers.
- headerAcceptRanges
StrThe range units a server accepts, or `none`.
- headerAge
StrHow long a cached response has been held, in seconds.
- headerAllow
StrThe methods a resource supports.
- headerAuthorization
StrThe client's credentials for the request.
- headerCacheControl
StrHow the response may be cached, and for how long.
- headerConnection
StrOptions for this connection only, such as `close`.
- headerContentEncoding
StrThe codings applied to the body, in the order applied.
- headerContentLanguage
StrThe languages the body is intended for.
- headerContentLength
StrThe length of the body in bytes.
- headerContentLocation
StrWhere the body can be found on its own.
- headerContentRange
StrWhich part of the whole this body is.
- headerContentType
StrThe media type of the body, and its character set.
- headerCookie
StrCookies the client is sending back.
- headerDate
StrWhen the message was produced.
- headerETag
StrA tag identifying this version of the resource.
- headerExpect
StrWhat the client requires the server to support.
- headerExpires
StrWhen the response stops being fresh.
- headerHost
StrThe host and port the request is addressed to.
- headerIfMatch
StrAct only if the resource matches one of these tags.
- headerIfModifiedSince
StrAct only if the resource changed after this time.
- headerIfNoneMatch
StrAct only if the resource matches none of these tags.
- headerIfRange
StrSend the range only if the resource is unchanged.
- headerIfUnmodifiedSince
StrAct only if the resource has not changed since this time.
- headerLastModified
StrWhen the resource last changed.
- headerLocation
StrWhere to go instead, or where a new resource was created.
- headerOrigin
StrThe origin the request was made from.
- headerPragma
StrDirectives kept for caches that predate `cache-control`.
- headerRange
StrThe part of the resource the client is asking for.
- headerReferer
StrThe page the request was made from.
- headerRetryAfter
StrHow long to wait before asking again.
- headerServer
StrWhat software answered the request.
- headerSetCookie
StrA cookie for the client to store and send back.
- headerTransferEncoding
StrThe codings applied for transfer, such as `chunked`.
- headerUpgrade
StrOther protocols the sender would rather speak.
- headerUserAgent
StrWhat software made the request.
- headerValues
&Array[(Str, Str)] -> Str -> Array[Str]Every value given for a header.
- headerVary
StrWhich request headers a cached response depends on.
- headerWwwAuthenticate
StrHow the client should authenticate.
- isCacheable
&Std.Http.Method -> BoolWhether a response to a method may be kept and used again.
- isChunked
&Array[(Str, Str)] -> BoolWhether a message says its body is sent in chunks.
- isClientError
&Std.Http.Status -> BoolWhether a status blames the caller.
- isError
&Std.Http.Status -> BoolWhether a status reports any kind of failure.
- isHopByHop
Str -> BoolWhether a header belongs to one connection rather than to the message.
- isIdempotent
&Std.Http.Method -> BoolWhether repeating a method has the same effect as sending it once.
- isInformational
&Std.Http.Status -> BoolWhether a status reports a provisional response.
- isRedirect
&Std.Http.Status -> BoolWhether a status asks the caller to look elsewhere.
- isSafe
&Std.Http.Method -> BoolWhether a method is defined to have no effect on the server.
- isServerError
&Std.Http.Status -> BoolWhether a status blames the server.
- isSuccess
&Std.Http.Status -> BoolWhether a status reports success.
- keepsAlive
&Std.Http.Version -> BoolWhether a version keeps the connection open unless told otherwise.
- keepsMethodOnRedirect
&Std.Http.Status -> BoolThe status a redirect answers with, and whether the method must be kept.
- mediaType
&Array[(Str, Str)] -> Option[Str]The media type a `content-type` header names, without its parameters.
- Method
A request method.
- methodFrom
Str -> Std.Http.MethodThe method a name stands for, or the fallback when it names none.
- methodName
&Std.Http.Method -> StrA method written the way the protocol writes it.
- negotiate
Str -> &Array[Str] -> Option[Str]The first offered choice the caller will accept, or `None`.
- parseAuth
Str -> Option[(Str, Str)]The scheme and the credentials an authorization header carries.
- parseCookies
Str -> Array[Std.Http.Cookie]Every cookie a `cookie` header carries.
- parseForm
Str -> Array[(Str, Str)]A form body read back into fields.
- parsePreferences
Str -> Array[Std.Http.Preference]An `accept`-style header read into choices, best first.
- parseRanges
Str -> Array[Std.Http.Range]The ranges a `range` header asks for, or nothing when it asks for none.
- Preference
One offered choice and the weight the caller gave it.
- Range
A byte range a request asked for: a first position and an optional last.
- reasonFor
Int -> StrThe reason phrase that goes with a status code.
- redirectTarget
&Std.Http.Response -> Option[Str]The target a redirect names, or `None` when the response is not one.
- renderChunked
Str -> StrA body written as one chunk followed by the terminator.
- renderContentRange
Int -> Int -> Int -> StrA `content-range` header value for a range of a known total length.
- renderCookies
&Array[Std.Http.Cookie] -> StrCookies written as a `cookie` header value.
- renderForm
&Array[(Str, Str)] -> StrA form body written as `application/x-www-form-urlencoded`.
- renderHead
&Std.Http.Request -> StrA request written as the protocol writes it, without a body.
- renderSetCookie
&Std.Http.SetCookie -> StrA cookie written as a `set-cookie` header value.
- renderStatusLine
&Std.Http.Status -> StrA response's first line, as the protocol writes it.
- request
Std.Http.Method -> Str -> Std.Http.RequestA request with a method and a target and nothing else.
- Request
A request, with nothing about how it will be sent.
- requestBytes
&Std.Http.Request -> BytesA request's body as bytes, with a byte body taking precedence over the text
- Response
A response, with nothing about how it arrived.
- responseBytes
&Std.Http.Response -> BytesThe body as bytes, with a binary body taking precedence over the text one.
- setCookie
Str -> Str -> Std.Http.SetCookieA cookie with only a name and a value, and the safe attributes set.
- SetCookie
The attributes a response attaches when it sets a cookie.
- setHeader
&Array[(Str, Str)] -> Str -> Str -> Array[(Str, Str)]Headers with every value for a name removed, then one added.
- status
Int -> Std.Http.StatusA status built from its number, with the reason the protocol gives.
- Status
A response status: its number and the reason given with it.
- Version
The protocol version a message was written in.
- versionFrom
Str -> Std.Http.VersionThe protocol version a name stands for.
- versionName
&Std.Http.Version -> StrA version written the way the protocol writes it.
- withBody
&Std.Http.Request -> Str -> Std.Http.RequestA request with a text body, and the length header that goes with it.
- withBytes
&Std.Http.Request -> &Bytes -> Std.Http.RequestA request carrying exact bytes as its body, and the length header that goes
- withForm
&Std.Http.Request -> &Array[(Str, Str)] -> Std.Http.RequestA request with a form body and the headers that describe it.
- withHeader
&Std.Http.Request -> Str -> Str -> Std.Http.RequestA request with one header added, keeping any it already had.
- withJson
&Std.Http.Request -> Str -> Std.Http.RequestA request with a JSON body and the headers that describe it.
