Provide an implicit value of this type to serialize arbitrary classes into a request body.
Provide an implicit value of this type to serialize arbitrary classes into a request body. Handlers might also provide special logic for serializer instances which they define (e.g. to handle streaming).
Use the factory methods multiPart
to conveniently create instances of
this class.
Use the factory methods multiPart
to conveniently create instances of
this class. A part can be then further customised using fileName
,
contentType
and header
methods.
Specifies if the method & uri are specified. By default can be
either:
* Empty
, which is a type constructor which always resolves to
None
. This type of request is aliased to PartialRequest
:
there's no method and uri specified, and the request cannot be
sent.
* Id
, which is an identity type constructor. This type of
request is aliased to Request
: the method and uri are
specified, and the request can be sent.
The type constructor in which responses are wrapped. E.g. Id
for synchronous handlers, Future
for asynchronous handlers.
The type of streams that are supported by the handler. Nothing
,
if streaming requests/responses is not supported by this handler.
A URI.
A URI. All components (scheme, host, query, ...) are stored unencoded, and become encoded upon serialization (using toString).
Either key-value pairs, single values, or plain
query fragments. Key value pairs will be serialized as k=v
, and blocks
of key-value pairs/single values will be combined using &
. Note that no
&
or other separators are added around plain query fragments - if
required, they need to be added manually as part of the plain query
fragment.
Uses utf-8
encoding.
Uses utf-8
encoding.
An empty request with no headers.
Content type will be set to application/octet-stream
, can be overridden
later using the contentType
method.
Content type will be set to application/octet-stream
, can be overridden
later using the contentType
method.
Content type will be set to application/octet-stream
, can be overridden
later using the contentType
method.
Content type will be set to application/octet-stream
, can be overridden
later using the contentType
method.
Content type will be set to application/octet-stream
, can be overridden
later using the contentType
method.
Content type will be set to text/plain
with utf-8
encoding, can be
overridden later using the contentType
method.
Content type will be set to text/plain
with utf-8
encoding, can be
overridden later using the contentType
method.
A starting request, with the following modifications comparing to
emptyRequest
:
A starting request, with the following modifications comparing to
emptyRequest
:
- Accept-Encoding
set to gzip, deflate
(handled automatically by the
library)