Struct ureq::RequestUrl[][src]

pub struct RequestUrl { /* fields omitted */ }
Expand description

Parsed result of a request url with handy inspection methods.

Implementations

Handle the request url as a standard url::Url.

Get the scheme of the request url, i.e. “https” or “http”.

Host of the request url.

Port of the request url, if available. Ports are only available if they are present in the original url. Specifically the scheme default ports, 443 for https and and 80 for http are None unless explicitly set in the url, i.e. https://my-host.com:443/some/path.

Path of the request url.

Returns all query parameters as a vector of key-value pairs.

let req = ureq::get("http://httpbin.org/get")
    .query("foo", "42")
    .query("foo", "43");

assert_eq!(req.request_url().unwrap().query_pairs(), vec![
    ("foo", "42"),
    ("foo", "43")
]);

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.