[][src]Struct misskey::HttpClient

pub struct HttpClient { /* fields omitted */ }
This is supported on crate feature http-client only.

Asynchronous HTTP-based client for Misskey.

HttpClient can be constructed using HttpClient::new, HttpClient::with_token or HttpClientBuilder.

Implementations

impl HttpClient[src]

pub fn new(url: Url) -> Result<HttpClient, Error>[src]

Creates a new HTTP-based client without a token.

pub fn with_token(
    url: Url,
    token: impl Into<String>
) -> Result<HttpClient, Error>
[src]

Creates a new HTTP-based client with a token.

pub fn builder<T>(url: T) -> HttpClientBuilder where
    T: TryInto<Url>,
    <T as TryInto<Url>>::Error: Into<Error>, 
[src]

Creates a new builder instance with url. All configurations are set to default.

This function is identical to HttpClientBuilder::new.

Trait Implementations

impl Client for HttpClient[src]

type Error = Error

The error type produced by the client when an error occurs.

impl Debug for HttpClient[src]

impl UploadFileClient for HttpClient[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<C> ClientExt for C where
    C: Sync + Client
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<C> UploadFileClientExt for C where
    C: Sync + UploadFileClient
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]