mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 23:17:42 +02:00
awc: Rename Client::build to Client::builder (#1665)
This commit is contained in:
@ -166,8 +166,9 @@ impl Client {
|
||||
Client::default()
|
||||
}
|
||||
|
||||
/// Build client instance.
|
||||
pub fn build() -> ClientBuilder {
|
||||
/// Create `Client` builder.
|
||||
/// This function is equivalent of `ClientBuilder::new()`.
|
||||
pub fn builder() -> ClientBuilder {
|
||||
ClientBuilder::new()
|
||||
}
|
||||
|
||||
|
@ -623,7 +623,7 @@ mod tests {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_client_header() {
|
||||
let req = Client::build()
|
||||
let req = Client::builder()
|
||||
.header(header::CONTENT_TYPE, "111")
|
||||
.finish()
|
||||
.get("/");
|
||||
@ -641,7 +641,7 @@ mod tests {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_client_header_override() {
|
||||
let req = Client::build()
|
||||
let req = Client::builder()
|
||||
.header(header::CONTENT_TYPE, "111")
|
||||
.finish()
|
||||
.get("/")
|
||||
|
@ -434,7 +434,7 @@ mod tests {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_header_override() {
|
||||
let req = Client::build()
|
||||
let req = Client::builder()
|
||||
.header(header::CONTENT_TYPE, "111")
|
||||
.finish()
|
||||
.ws("/")
|
||||
|
Reference in New Issue
Block a user