Trait quickhttp::builder::ValidBuilder
source · pub trait ValidBuilder {
// Required methods
fn new() -> Self;
fn build(&self) -> Result<Request, BuilderError>;
fn host(&mut self, host: String) -> &mut Self;
fn port(&mut self, port: u16) -> &mut Self;
fn http_version(&mut self, http_version: String) -> &mut Self;
fn method(&mut self, method: String) -> &mut Self;
fn path(&mut self, path: String) -> &mut Self;
fn header(&mut self, key: String, value: String) -> &mut Self;
fn body(&mut self, body: String) -> &mut Self;
fn uri(&mut self, uri: String) -> &mut Self;
}
Expand description
Describes the request builder
Required Methods§
sourcefn host(&mut self, host: String) -> &mut Self
fn host(&mut self, host: String) -> &mut Self
Set the host of the request (example: httpbin.org)
sourcefn http_version(&mut self, http_version: String) -> &mut Self
fn http_version(&mut self, http_version: String) -> &mut Self
Set the HTTP version of the request (example: 1.1)
sourcefn header(&mut self, key: String, value: String) -> &mut Self
fn header(&mut self, key: String, value: String) -> &mut Self
Set a header of the request (example: Content-Type, application/json)
Object Safety§
This trait is not object safe.