Struct plex_api::HttpClient
source · [−]pub struct HttpClient {
pub api_url: Uri,
pub http_client: IsahcHttpClient,
pub x_plex_provides: String,
pub x_plex_platform: String,
pub x_plex_platform_version: String,
pub x_plex_product: String,
pub x_plex_version: String,
pub x_plex_device: String,
pub x_plex_device_name: String,
pub x_plex_client_identifier: String,
pub x_plex_sync_version: String,
/* private fields */
}
Fields
api_url: Uri
http_client: IsahcHttpClient
x_plex_provides: String
X-Plex-Provides
header value. Comma-separated list.
Should be one or more of controller
, server
, sync-target
, player
.
x_plex_platform: String
X-Plex-Platform
header value.
Platform name, e.g. iOS, macOS, etc.
x_plex_platform_version: String
X-Plex-Platform-Version
header value.
OS version, e.g. 4.3.1
x_plex_product: String
X-Plex-Product
header value.
Application name, e.g. Laika, Plex Media Server, Media Link.
x_plex_version: String
X-Plex-Version
header value.
Application version, e.g. 10.6.7.
x_plex_device: String
X-Plex-Device
header value.
Device name and model number, e.g. iPhone3,2, Motorola XOOM™, LG5200TV.
x_plex_device_name: String
X-Plex-Device-Name
header value.
Primary name for the device, e.g. “Plex Web (Chrome)”.
x_plex_client_identifier: String
X-Plex-Client-Identifier
header value.
UUID, serial number, or other number unique per device.
N.B. Should be unique for each of your devices.
x_plex_sync_version: String
X-Plex-Sync-Version
header value.
Not sure what are the valid values, but at the time of writing Plex Web sends 2
here.
Implementations
pub fn post<T>(&self, path: T) -> RequestBuilder<'_, T> where
PathAndQuery: TryFrom<T>,
<PathAndQuery as TryFrom<T>>::Error: Into<Error>,
pub fn get<T>(&self, path: T) -> RequestBuilder<'_, T> where
PathAndQuery: TryFrom<T>,
<PathAndQuery as TryFrom<T>>::Error: Into<Error>,
pub fn put<T>(&self, path: T) -> RequestBuilder<'_, T> where
PathAndQuery: TryFrom<T>,
<PathAndQuery as TryFrom<T>>::Error: Into<Error>,
pub fn delete<T>(&self, path: T) -> RequestBuilder<'_, T> where
PathAndQuery: TryFrom<T>,
<PathAndQuery as TryFrom<T>>::Error: Into<Error>,
Set the client’s authentication token.
Get a reference to the client’s authentication token.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe for HttpClient
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more