Package io.ktor.http
Types
Exception thrown when a content type string is malformed.
Represents a value for a Cache-Control header
Represents Content-Disposition header value
Represents a Range header's particular range
Represents a value for a Content-Type header.
Interface for any objects that can match a ContentType.
Cooke encoding strategy
Represents HTTP headers as a map from case-insensitive names to collection of String values
Represents a header value. Similar to HeaderValueWithParameters
Represents a single value parameter
Represents a header value that consist of content followed by parameters. Useful for headers such as Content-Type, Content-Disposition and so on.
A message either from the client or the server, that has headers associated.
A builder message either for the client or the server, that has a headers builder associated.
Represents an HTTP method (verb)
Represents an HTTP protocol version.
Represents an HTTP status code and description.
Thrown when an illegal header name was used. A header name should only consist from visible characters without delimiters "double quote" and the following characters: (),/:;<=>?@[\]{}.
Thrown when an illegal header value was used. A header value should only consist from visible characters, spaces and/or HTAB (0x09).
Represents a Link header value as per RFC 5988
Represents HTTP parameters as a map from case-insensitive names to collection of String values
Range specifier for partial content requests (RFC 2616 sec 14.35.1)
Possible content range units: bytes and none
Represents request address information is used to make a call. There are at least two possible instances: "local" is how we see request at the server application and "actual" is what we can recover from proxy provided headers.
Thrown when an attempt to set unsafe header detected. A header is unsafe if listed in HttpHeaders.UnsafeHeadersList.
A URL builder with all mutable components
URL decoder exception
Options for URL Encoding. Keys and values are encoded only when encodeKey and encodeValue are true respectively.
Thrown when failed to parse URL
Represents URL protocol
Functions
Append formatted header value to the builder
Parse CacheControl header.
Extracts a Charset value from the given Content-Type, Content-Disposition or similar header value.
Parse charset from Content-Type header value.
Create a copy of this builder. Modifications in a copy is not reflected in the original instance and vise-versa.
Parse Content-Length header value.
Format Content-Range header value
Parse Content-Type header value.
Set Content-Type header.
Parse Set-Cookie header value.
Parse Date header.
Decode cookie value using the specified encoding
Default ContentType for extension
Default ContentType for file path
Encode cookie value using the specified encoding
Encode this in percent encoding specified here: https://tools.ietf.org/html/rfc5849#section-3.6
Encode this as query parameter key.
Encode URL path or component. It escapes all illegal or ambiguous characters
Escape using double quotes if needed or keep as is if no dangerous strings found
Parse E-Tag header value.
Set E-Tag header
Parse Expires header.
Recommended file name extensions for this content type
Encode form parameters
Encode form parameters from a list of pairs
Encode form parameters to the specified out appendable
Encode form parameters from a list of pairs to the specified out appendable
Convert valid cookie date String to GMTDate trying first the RFC6265 standard, falling back on fromHttpToGmtDate
Recommended content type by file name extension
Recommended content types by file path
Convert valid http date String to GMTDate trying various http date formats from HTTP_DATE_FORMATS
Returns empty headers
Set If-Modified-Since header.
Set If-None-Match header value.
Check if the protocol is secure
Checks if a given status code is a success code according to HTTP standards.
Check if the protocol is websocket
Parse Last-Modified header.
Append Max-Age header value.
Returns an empty parameters instance
Creates a parameters instance from the specified pairs
Creates a parameters instance containing only single pair
Parse Content-Type header values and sort them by quality and asterisks quantity
Parse header value and sort multiple values according to qualities
Parse header value respecting multi-values
Parse query string withing starting at the specified startIndex but up to limit pairs
Parse query string withing starting at the specified startIndex but up to limit pairs
Parse Range header value
Parse server's Set-Cookie header value
Parse URL query parameters. Shouldn't be used for urlencoded forms because of + character.
Adds components to current encodedPath
Plus operator function that creates a new parameters instance from the original one concatenating with other
Format Cookie header value
Format Set-Cookie header value
Parse Set-Cookie header value.
Construct a list of HeaderValueParam from an iterable of pairs
Construct URLBuilder from builder.
Construct URLBuilder from url.
Construct URLBuilder from urlString.
Set User-Agent header value.
Parse Vary header value.
Creates a copy of this type with the added charset parameter with charset value.