pub struct ClientRequest<T> {
pub target: Target,
pub method: Method,
pub path: String,
pub api_key_position: ApiKeyPosition,
pub body: Option<T>,
pub params: Option<HashMap<String, String>>,
}Expand description
Client request configuration
Fields§
§target: Target§method: Method§path: String§api_key_position: ApiKeyPosition§body: Option<T>§params: Option<HashMap<String, String>>Implementations§
Source§impl<T> ClientRequest<T>
impl<T> ClientRequest<T>
Sourcepub fn get(
path: String,
target: Target,
api_key_position: ApiKeyPosition,
) -> Self
pub fn get( path: String, target: Target, api_key_position: ApiKeyPosition, ) -> Self
Create a new GET request
Sourcepub fn post(
path: String,
target: Target,
api_key_position: ApiKeyPosition,
body: T,
) -> Self
pub fn post( path: String, target: Target, api_key_position: ApiKeyPosition, body: T, ) -> Self
Create a new POST request
Sourcepub fn with_params(self, params: HashMap<String, String>) -> Self
pub fn with_params(self, params: HashMap<String, String>) -> Self
Add query parameters
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ClientRequest<T>
impl<T> RefUnwindSafe for ClientRequest<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for ClientRequest<T>
impl<T> Sync for ClientRequest<T>
impl<T> Unpin for ClientRequest<T>
impl<T> UnsafeUnpin for ClientRequest<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for ClientRequest<T>where
Option<T>: UnwindSafe,
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