1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-28 01:32:57 +01:00
actix-extras/awc/src
Peter Ding 64f603b076 Support to set header names of ClientRequest as Camel-Case (#713)
* Support to set header names of `ClientRequest` as Camel-Case

This is the case for supporting to request for servers which don't
perfectly implement the `RFC 7230`. It is important for an app
which uses `ClientRequest` as core part.

* Add field `upper_camel_case_headers` to `ClientRequest`.

* Add function `set_upper_camel_case_headers` to `ClientRequest`
  and `ClientRequestBuilder` to set field `upper_camel_case_headers`.

* Add trait `client::writer::UpperCamelCaseHeader` for
  `http::header::HeaderName`, let it can be converted to Camel-Case
  then writed to buffer.

* Add test `test_client::test_upper_camel_case_headers`.

* Support upper Camel-Case headers

* [actix-http] Add field `upper_camel_case_headers` for `RequestHead`
* [actix-http] Add code for `MessageType` to support upper camel case
* [awc] Add functions for `ClientRequest` to set upper camel case

* Use `Flags::CAMEL_CASE` for upper camel case of headers
2019-04-24 10:48:49 -07:00
..
builder.rs allow to specify server address for http and ws requests 2019-04-19 18:03:44 -07:00
connect.rs allow to specify server address for http and ws requests 2019-04-19 18:03:44 -07:00
error.rs do not use static 2019-04-02 10:53:44 -07:00
lib.rs use custom headers map; more optimizations 2019-04-06 15:02:02 -07:00
request.rs Support to set header names of ClientRequest as Camel-Case (#713) 2019-04-24 10:48:49 -07:00
response.rs use custom headers map; more optimizations 2019-04-06 15:02:02 -07:00
test.rs update tests 2019-04-14 20:20:33 -07:00
ws.rs allow to specify server address for http and ws requests 2019-04-19 18:03:44 -07:00