#[patch]
Expand description
A procedural macro for building an HTTP PATCH method of trait. It includes the following attributes:
- path - a part of the URL path
- consumes - content-type for request
- produces - content-type for response
PATCH method supports argument macros:
- #[segment] - maps method arguments to path segments
- #[query] - maps method arguments to query parameters
- #header - maps method arguments to request headers
- #[body] - maps method arguments to request body
Example:
#[patch(path = "/{path_query}", consumes = "application/json", produces = "application/json")]
fn options(&self, #[segment] path_query: &str, #[query] query_param: &str) -> ClientixResult<ClientixResponse<String>>;