struct
Request
pub struct Request {
pub method: Method,
pub url: String,
pub headers: Vec<(String, String)>,
pub body: Option<String>,
pub binary: bool,
}An HTTP request, ready to send.
Fields
Methods
new
pub fn new(method: Method, url: impl Into<String>) -> RequestA request with method to url, with no headers or body.
header
pub fn header(self, name: &str, value: impl Into<String>) -> RequestAdd (or replace) a header.
header_value
pub fn header_value(&self, name: &str) -> Option<&str>The value of header name (in any case), if set.