pub struct Builder { /* private fields */ }Expand description
See Client::get()
Make a new request by constructing the request URL bit by bit
Implementations§
source§impl Builder
impl Builder
sourcepub fn path(self, url_part: &'static str) -> Self
pub fn path(self, url_part: &'static str) -> Self
Add a constant path to the request, e.g. .path("users")
Inner slashes are OK, but the string must not start or end with a slash.
Panics if query string has been added.
It’s appended raw, so must be URL-safe.
sourcepub fn arg(self, arg: &str) -> Self
pub fn arg(self, arg: &str) -> Self
Add a user-supplied argument to the request path, e.g. .path("users").arg(username),
or after a call to query(), starts adding fragments to the query string with no delimiters.
The arg is URL-escaped, so it’s safe to use any user-supplied data.