pub struct RequestPartsBuilder<'r>(_);
Expand description

HTTP 请求信息构建器

不包含请求体信息

Implementations§

创建 HTTP 请求信息构建器

设置 HTTP 请求 URL

设置请求 HTTP 版本

设置请求 HTTP 方法

设置请求 HTTP Headers

插入请求 HTTP Header

设置扩展信息

追加扩展信息

设置 UserAgent

设置预解析的服务器套接字地址

设置上传进度回调

设置接受到响应状态回调

设置接受到响应 Header 回调

创建 HTTP 请求信息

Examples found in repository?
src/request.rs (line 348)
347
348
349
350
    pub fn build_with_body<B: 'r>(&mut self, body: B) -> Request<'r, B> {
        let parts = self.build();
        Request { parts, body }
    }

创建 HTTP 请求

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.