Type Definition qiniu_http_client::SyncRequestBuilder
source · [−]pub type SyncRequestBuilder<'r, E> = RequestBuilder<'r, SyncRequestBody<'r>, E>;
Expand description
阻塞请求构建器
Implementations
sourceimpl<'r, E: 'r> SyncRequestBuilder<'r, E>
impl<'r, E: 'r> SyncRequestBuilder<'r, E>
sourcepub fn stream_as_body(
&mut self,
body: impl Read + Reset + Debug + Send + Sync + 'static,
content_length: u64,
content_type: Option<Mime>
) -> &mut Self
pub fn stream_as_body(
&mut self,
body: impl Read + Reset + Debug + Send + Sync + 'static,
content_length: u64,
content_type: Option<Mime>
) -> &mut Self
设置 HTTP 请求体为输入流
sourcepub fn referenced_stream_as_body<T: Read + Reset + Debug + Send + Sync>(
&mut self,
body: &'r mut T,
content_length: u64,
content_type: Option<Mime>
) -> &mut Self
pub fn referenced_stream_as_body<T: Read + Reset + Debug + Send + Sync>(
&mut self,
body: &'r mut T,
content_length: u64,
content_type: Option<Mime>
) -> &mut Self
设置 HTTP 请求体为输入流的可变引用
sourcepub fn bytes_as_body(
&mut self,
body: impl Into<Vec<u8>>,
content_type: Option<Mime>
) -> &mut Self
pub fn bytes_as_body(
&mut self,
body: impl Into<Vec<u8>>,
content_type: Option<Mime>
) -> &mut Self
设置 HTTP 请求体为内存数据
sourcepub fn referenced_bytes_as_body(
&mut self,
body: &'r [u8],
content_type: Option<Mime>
) -> &mut Self
pub fn referenced_bytes_as_body(
&mut self,
body: &'r [u8],
content_type: Option<Mime>
) -> &mut Self
设置 HTTP 请求体为内存数据的引用
sourcepub fn json(&mut self, body: impl Serialize) -> JsonResult<&mut Self>
pub fn json(&mut self, body: impl Serialize) -> JsonResult<&mut Self>
设置 HTTP 请求体为 JSON 对象
sourceimpl<'r, E: EndpointsProvider + Clone + 'r> SyncRequestBuilder<'r, E>
impl<'r, E: EndpointsProvider + Clone + 'r> SyncRequestBuilder<'r, E>
sourcepub fn call(&mut self) -> ApiResult<SyncResponse>
pub fn call(&mut self) -> ApiResult<SyncResponse>
阻塞发起 HTTP 请求