pub struct ApiRequest {
pub method: HttpMethod,
pub path: String,
pub query_params: Vec<(String, String)>,
pub body: Option<RequestBody>,
pub content_type: Option<String>,
}Expand description
An HTTP request to the Onshape API, produced as an effect by build_request.
This is a pure data structure describing what HTTP call to make. It does not include the base URL or authentication — those are added by the I/O layer when executing the request.
Fields§
§method: HttpMethodHTTP method.
path: StringFully resolved URL path (path params substituted), e.g. /documents/abc123.
query_params: Vec<(String, String)>Query parameters.
body: Option<RequestBody>Request body, if any.
content_type: Option<String>Content type for the request body.
Trait Implementations§
Source§impl Clone for ApiRequest
impl Clone for ApiRequest
Source§fn clone(&self) -> ApiRequest
fn clone(&self) -> ApiRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApiRequest
impl Debug for ApiRequest
Source§impl<'de> Deserialize<'de> for ApiRequest
impl<'de> Deserialize<'de> for ApiRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ApiRequest
impl RefUnwindSafe for ApiRequest
impl Send for ApiRequest
impl Sync for ApiRequest
impl Unpin for ApiRequest
impl UnsafeUnpin for ApiRequest
impl UnwindSafe for ApiRequest
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