Trait twitch_api2::helix::RequestPost[][src]

pub trait RequestPost: Request {
    type Body: HelixRequestBody;
    fn create_request(
        &self,
        body: Self::Body,
        token: &str,
        client_id: &str
    ) -> Result<Request<Vec<u8>>, CreateRequestError> { ... }
fn parse_response(
        request: Option<Self>,
        uri: &Uri,
        response: Response<Vec<u8>>
    ) -> Result<Response<Self, Self::Response>, HelixRequestPostError>
    where
        Self: Sized
, { ... }
fn parse_inner_response(
        request: Option<Self>,
        uri: &Uri,
        response: &str,
        _status: StatusCode
    ) -> Result<Response<Self, Self::Response>, HelixRequestPostError>
    where
        Self: Sized
, { ... } }
This is supported on crate feature helix only.

Helix endpoint POSTs information

Associated Types

type Body: HelixRequestBody[src]

Body parameters

Loading content...

Provided methods

fn create_request(
    &self,
    body: Self::Body,
    token: &str,
    client_id: &str
) -> Result<Request<Vec<u8>>, CreateRequestError>
[src]

Create a http::Request from this Request in your client

fn parse_response(
    request: Option<Self>,
    uri: &Uri,
    response: Response<Vec<u8>>
) -> Result<Response<Self, Self::Response>, HelixRequestPostError> where
    Self: Sized
[src]

Parse response.

Notes

Pass in the request to enable pagination if supported.

fn parse_inner_response(
    request: Option<Self>,
    uri: &Uri,
    response: &str,
    _status: StatusCode
) -> Result<Response<Self, Self::Response>, HelixRequestPostError> where
    Self: Sized
[src]

Parse a response string into the response.

Loading content...

Implementors

impl RequestPost for StartCommercialRequest[src]

impl RequestPost for CheckAutoModStatusRequest[src]

impl RequestPost for CreateCustomRewardRequest[src]

type Body = CreateCustomRewardBody

impl RequestPost for CreateUserFollowsRequest[src]

type Body = CreateUserFollowsBody

impl<E: EventSubscription> RequestPost for CreateEventSubSubscriptionRequest<E>[src]

This is supported on crate feature eventsub only.

type Body = CreateEventSubSubscriptionBody<E>

impl<T: Topic> RequestPost for WebhookHubRequest<T>[src]

type Body = WebhookHubBody<T>

Loading content...