pub struct Client { /* fields omitted */ }
A client for making authenticated requests to the ExtraHop REST API.
The client encapsulates the host name and API key needed to make calls to
the appliance.
Creates a new client which connects to the specified host using the provided key.
Creates a new client with certificate verification disabled. This should only be used
when a human has passed an --insecure
flag or the like.
Gets the appliance's host string.
Creates a GET request builder for the provided relative path with the
Authorization
header included.
The path should not include the /api/v1
prefix.
let client = Client::new("extrahop.i.northwind.com", ApiKey::new("key"));
client.get("/whitelist/devices").send().unwrap();
Creates a POST request builder for the provided relative path with the
Authorization
header included.
The path should not include the /api/v1
prefix.
Creates a PATCH request builder for the provided relative path with the
Authorization
header included.
The path should not include the /api/v1
prefix.
Creates a PUT request builder for the provided relative path with the
Authorization
header included.
The path should not include the /api/v1
prefix.
Creates a DELETE request builder for the provided relative path with the
Authorization
header included.
The path should not include the /api/v1/
prefix.
Creates a request builder for the provided relative path with the
Authorization
header included.
The path should not include the /api/v1
prefix.
use reqwest::Method;
let client = Client::new("extrahop", ApiKey::new("key".to_string()));
client.request(Method::Get, "/whitelist/devices").send().unwrap();
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static