Struct multipart::mock::ClientRequest
[−]
[src]
pub struct ClientRequest { /* fields omitted */ }A mock implementation of client::HttpRequest which can spawn an HttpBuffer.
client::HttpRequest impl requires the client feature.
Trait Implementations
impl Default for ClientRequest[src]
fn default() -> ClientRequest
Returns the "default value" for a type. Read more
impl Debug for ClientRequest[src]
impl HttpRequest for ClientRequest[src]
type Stream = HttpBuffer
The HTTP stream type that can be opend by this request, to which the multipart data will be written. Read more
type Error = Error
The error type for this request. Must be compatible with io::Error as well as Self::HttpStream::Error Read more
fn apply_headers(&mut self, boundary: &str, content_len: Option<u64>) -> bool
Set the Content-Type header to multipart/form-data and supply the boundary value. If content_len is given, set the Content-Length header to its value. Read more
fn open_stream(self) -> Result<HttpBuffer, Error>
Panics
If apply_headers() was not called.