Package-level declarations
Types
A spec for configuring an AdapterCodec.
A series of caches invoked sequentially during an HTTP call.
A spec for configuring a CacheChain.
A spec for configuring CacheControl instances.
An object that intercepts requests before being sent and responses before being returned. The intercept function is a suspending function, meaning it is invoked as a coroutine. The coroutine shares the kotlin.coroutines.CoroutineContext used when the HTTP call is first initiated. Typically, this means that all interceptors, along with the HTTP call, are invoked within the same CoroutineScope, and thus typically the same parent kotlinx.coroutines.Job.
A spec for adding interceptors to a client.
A BodyAdapter that uses the serialization package for encoding or decoding Kotlin objects using any format represented by SerialFormat. The given SerialFormat is expected to be a StringFormat or a BinaryFormat, with a preference for the former if both.
A spec for configuring a MultipartBody.
Marks a type as a specification for configuring some object or property, typically by invoking a user-provided block with the spec as its receiver.
A Spec for configuring map-like properties with string keys and multi string values.
A spec for configuring request tags.
Functions
Creates a new com.github.mizosoft.methanol.AdapterCodec as configured by the given spec block.
Creates a new com.github.mizosoft.methanol.kotlin.CacheChain as configured by the given spec block.
Creates a new CacheControl as configured by the given spec block.
Closes all caches in this chain.
Returns an AutoCloseable that closes all caches in this chain when invoked.
Fetches the response to sending a DELETE request to the given URI, mapping the response body into T. A spec block can be optionally passed to customize the request.
Fetches the response to sending a DELETE request to the given URI, mapping the response body with the given BodyHandler. A spec block can be optionally passed to customize the request.
Fetches the response to sending the given request, mapping the response body into T.
Fetches the response to sending a request to the given URI, mapping the response body into T. The request has a GET method by default. A spec block can be optionally passed to customize the request.
Fetches the response sending a request to the given URI, mapping the response body with the given BodyHandler. The request has a GET method by default. A spec block can be optionally passed to customize the request.
Creates a new FormBody as configured by the given spec block.
Returns all header values associated with the given name.
Fetches the response to sending a GET request to the given URI, mapping the response body into T. A spec block can be optionally passed to customize the request.
Fetches the response to sending a GET request to the given URI, mapping the response body with the given BodyHandler. A spec block can be optionally passed to customize the request.
Returns a BodyHandler for the given type.
Creates a new Headers as configured by the given spec block.
Creates a copy of the given headers after configuring with the given spec block.
Returns whether this response is 4xx client error.
Returns whether this response is 1xx informational.
Returns whether this response is 3xx redirection.
Returns whether this response is 5xx server error.
Returns whether this response is 2xx successful.
Creates a new MultipartBody as configured by the given spec block.
Creates a new MultipartBodyPart as configured by the given spec block.
Fetches the response to sending a PATCH request to the given URI, mapping the response body into T. A spec block can be optionally passed to customize the request.
Fetches the response to sending a PATCH request to the given URI, mapping the response body with the given BodyHandler. A spec block can be optionally passed to customize the request.
Fetches the response to sending a POST request to the given URI, mapping the response body into T. A spec block can be optionally passed to customize the request.
Fetches the response to sending a POST request to the given URI, mapping the response body with the given BodyHandler. A spec block can be optionally passed to customize the request.
Fetches the response to sending a PUT request to the given URI, mapping the response body into T. A spec block can be optionally passed to customize the request.
Fetches the response to sending a PUT request to the given URI, mapping the response body with the given BodyHandler. A spec block can be optionally passed to customize the request.
Creates a new Request as configured by the given spec block.
Creates a copy of the given request after configuring with the given spec block.
Returns a BodySubscriber for the given type and Hints.
Parses the given string into a CacheControl instance as specified by the Cache-Control
header.
Parses the given strings into a CacheControl instance as specified by the Cache-Control
header.
Returns a string representation for this Headers that is similar to how it would appear in an HTTP/1.1 response. valueToString can be used to control how header values appear, or whether they appear at all, in the returned string. You can use this to hide/exclude sensitive headers.
Parses the given string into a MediaType.
Returns this request if it is a TaggableRequest, or a TaggableRequest copy with no tags otherwise.
Associated the given media type with this BodyPublisher through a MimeBodyPublisher. This allows the Client to automatically add a corresponding Content-Type
header.