pub struct SizedRequest<R> { /* fields omitted */ }
A wrapper around a request object that measures the request body and sets the Content-Length
header to its size in bytes.
Sized requests are more human-readable and use less bandwidth
(as chunking adds visual noise and overhead),
but they must be able to load their entirety, including the contents of all files
and streams, into memory so the request body can be measured.
You should really only use sized requests if you intend to inspect the data manually on the
server side, as it will produce a more human-readable request body. Also, of course, if the
server doesn't support chunked requests or otherwise rejects them.
The HTTP stream type that can be opend by this request, to which the multipart data will be written. Read more
The error type for this request. Must be compatible with io::Error
as well as Self::HttpStream::Error
Read more
SizedRequest
ignores _content_len
because it sets its own later.
Open the request stream and return it or any error otherwise.
The request type that opened this stream.
The response type that will be returned after the request is completed.
The error type for this stream. Must be compatible with io::Error
as well as Self::Request::Error
. Read more
Finalize and close the stream and return the response object, or any error otherwise.
Write a buffer into this writer, returning how many bytes were written. Read more
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Attempts to write an entire buffer into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more
Creates a "by reference" adaptor for this instance of Write
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
impl<T> Typeable for T where T: Any, | |
Get the TypeId
of this object.
impl<W> WriteBytesExt for W where W: Write + ?Sized, | |
Writes an unsigned 8 bit integer to the underlying writer. Read more
Writes a signed 8 bit integer to the underlying writer. Read more
Writes an unsigned 16 bit integer to the underlying writer. Read more
Writes a signed 16 bit integer to the underlying writer. Read more
Writes an unsigned 24 bit integer to the underlying writer. Read more
Writes a signed 24 bit integer to the underlying writer. Read more
Writes an unsigned 32 bit integer to the underlying writer. Read more
Writes a signed 32 bit integer to the underlying writer. Read more
Writes an unsigned 48 bit integer to the underlying writer. Read more
Writes a signed 48 bit integer to the underlying writer. Read more
Writes an unsigned 64 bit integer to the underlying writer. Read more
Writes a signed 64 bit integer to the underlying writer. Read more
Writes an unsigned 128 bit integer to the underlying writer.
Writes a signed 128 bit integer to the underlying writer.
Writes an unsigned n-bytes integer to the underlying writer. Read more
Writes a signed n-bytes integer to the underlying writer. Read more
Writes an unsigned n-bytes integer to the underlying writer. Read more
Writes a signed n-bytes integer to the underlying writer. Read more
Writes a IEEE754 single-precision (4 bytes) floating point number to the underlying writer. Read more
Writes a IEEE754 double-precision (8 bytes) floating point number to the underlying writer. Read more
impl<T> UnsafeAny for T where T: Any, | |