Struct botx_api::api::utils::request_manager::RequestManager
source · pub struct RequestManager {}Implementations§
source§impl RequestManager
impl RequestManager
pub const JSON_CONTENT_TYPE: &str = "application/json"
pub const MULTIPART_CONTENT_TYPE: &str = "multipart/form-data"
pub async fn post<TRequest, TResponse, TError>( request_name: impl Into<String> + Display, url: impl IntoUrl + Debug, request: &TRequest, content_type: impl Into<String> + Display, context: &Arc<RwLock<BotXApiContext>> ) -> BotXApiResult<TResponse, TError>where TRequest: Serialize, for<'a> TResponse: Deserialize<'a> + Debug, for<'a> TError: Deserialize<'a> + Debug,
pub async fn put<TRequest, TResponse, TError>( request_name: impl Into<String> + Display, url: impl IntoUrl + Debug, request: &TRequest, content_type: impl Into<String> + Display, context: &Arc<RwLock<BotXApiContext>> ) -> BotXApiResult<TResponse, TError>where TRequest: Serialize, for<'a> TResponse: Deserialize<'a> + Debug, for<'a> TError: Deserialize<'a> + Debug,
pub async fn get<TResponse, TError>( request_name: impl Into<String> + Display, url: impl IntoUrl + Debug, content_type: impl Into<String> + Display, context: &Arc<RwLock<BotXApiContext>> ) -> BotXApiResult<TResponse, TError>where for<'a> TResponse: Deserialize<'a> + Debug, for<'a> TError: Deserialize<'a> + Debug,
pub async fn get_file<TError>( request_name: impl Into<String> + Display, url: impl IntoUrl + Debug, content_type: impl Into<String> + Display, context: &Arc<RwLock<BotXApiContext>> ) -> BotXApiResult<FileResponse, TError>where for<'a> TError: Deserialize<'a> + Debug,
pub async fn delete<TResponse, TError>( request_name: impl Into<String> + Display, url: impl IntoUrl + Debug, content_type: impl Into<String> + Display, context: &Arc<RwLock<BotXApiContext>> ) -> BotXApiResult<TResponse, TError>where for<'a> TResponse: Deserialize<'a> + Debug, for<'a> TError: Deserialize<'a> + Debug,
pub async fn post_multipart<TResponse, TError>( request_name: impl Into<String> + Display, url: impl IntoUrl + Debug, data: Vec<MultipartPartData>, context: &Arc<RwLock<BotXApiContext>> ) -> BotXApiResult<TResponse, TError>where for<'a> TResponse: Deserialize<'a> + Debug, for<'a> TError: Deserialize<'a> + Debug,
Auto Trait Implementations§
impl RefUnwindSafe for RequestManager
impl Send for RequestManager
impl Sync for RequestManager
impl Unpin for RequestManager
impl UnwindSafe for RequestManager
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more