pub struct NoContentRequestBuilder { /* private fields */ }Expand description
表示不关心响应体的请求构建器。
Implementations§
Source§impl NoContentRequestBuilder
impl NoContentRequestBuilder
Sourcepub fn body_value(self, body: impl Into<JsonPayload>) -> Self
pub fn body_value(self, body: impl Into<JsonPayload>) -> Self
设置 JSON 请求体。
Sourcepub fn remove_header(self, key: impl Into<String>) -> Self
pub fn remove_header(self, key: impl Into<String>) -> Self
删除一个默认请求头。
Sourcepub fn extra_body(
self,
key: impl Into<String>,
value: impl Into<JsonPayload>,
) -> Self
pub fn extra_body( self, key: impl Into<String>, value: impl Into<JsonPayload>, ) -> Self
在 JSON 根对象中追加字段。
Sourcepub fn provider_option(
self,
key: impl Into<String>,
value: impl Into<JsonPayload>,
) -> Self
pub fn provider_option( self, key: impl Into<String>, value: impl Into<JsonPayload>, ) -> Self
在 provider 对应的 provider_options 下追加字段。
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
覆盖最大重试次数。
Sourcepub fn cancellation_token(self, token: CancellationToken) -> Self
pub fn cancellation_token(self, token: CancellationToken) -> Self
设置取消令牌。
Sourcepub async fn send_with_meta(self) -> Result<ApiResponse<()>>
pub async fn send_with_meta(self) -> Result<ApiResponse<()>>
Trait Implementations§
Source§impl Clone for NoContentRequestBuilder
impl Clone for NoContentRequestBuilder
Source§fn clone(&self) -> NoContentRequestBuilder
fn clone(&self) -> NoContentRequestBuilder
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 moreAuto Trait Implementations§
impl Freeze for NoContentRequestBuilder
impl !RefUnwindSafe for NoContentRequestBuilder
impl Send for NoContentRequestBuilder
impl Sync for NoContentRequestBuilder
impl Unpin for NoContentRequestBuilder
impl UnsafeUnpin for NoContentRequestBuilder
impl !UnwindSafe for NoContentRequestBuilder
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