1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 08:22:59 +01:00
Commit Graph

58 Commits

Author SHA1 Message Date
Rob Ede
77efc09362
hide httpmessage mod 2021-02-11 22:58:40 +00:00
Rob Ede
949d14ae2b
clean up header map (#1964) 2021-02-09 22:59:17 +00:00
Rob Ede
b1dd8d28bc
response header rework (#1869) 2021-01-15 02:11:10 +00:00
Rob Ede
2d4a174420
fmt 2021-01-04 01:01:35 +00:00
Rob Ede
21f6c9d7a5
improve code readability 2021-01-04 00:49:02 +00:00
Rob Ede
4cb833616a
deprecate builder if-x methods (#1760) 2020-10-30 02:10:05 +00:00
Jonas
06e5042b94
use idenity encoding on client if no compression features are enabled (#1737)
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2020-10-24 21:15:01 +01:00
Igor Aleksanov
121075c1ef
awc: Rename Client::build to Client::builder (#1665) 2020-09-11 09:24:39 +01:00
Patrick Tescher
e10eb648d9
Fix leaks with actix_http's client (#1580) 2020-07-10 22:35:22 +01:00
Rob Ede
eb0eda69c6
migrate cookie handling to cookie crate (#1558) 2020-06-19 14:34:14 +01:00
Yuki Okushi
d7abbff3b0
awc: Minimize futures dependencies 2020-05-19 08:29:12 +09:00
Nikolay Kim
c1deaaeb2f cleanup imports 2019-12-13 11:24:57 +06:00
Nikolay Kim
4a8a9ef405 update tests and clippy warnings 2019-12-08 12:31:16 +06:00
daxpedda
e5f3d88a4e Switch brotli compressor to rust. (#1197)
* Switch to a rustified version of brotli.

* Some memory optimizations.

* Make brotli not optional anymore.
2019-12-07 21:55:41 +06:00
Nikolay Kim
205a964d8f upgrade to tokio 0.2 2019-12-05 23:35:43 +06:00
Nikolay Kim
4dc31aac93 use actix_rt::test for test setup 2019-11-26 11:25:50 +06:00
Nikolay Kim
1f0577f8d5 cleanup api doc examples 2019-11-21 16:02:17 +06:00
Nikolay Kim
b510527a9f update awc tests 2019-11-21 16:02:17 +06:00
Nikolay Kim
5ab29b2e62 migrate awc and test-server to std::future 2019-11-21 16:02:17 +06:00
Jonathas Conceição
f0612f7570 awc: Add support for setting query from Serialize type for client request (#1130)
Signed-off-by: Jonathas-Conceicao <jadoliveira@inf.ufpel.edu.br>
2019-10-26 08:27:14 +03:00
Sven-Hendrik Haase
23f04c4f38 Add remaining getter methods from private head field 2019-09-25 08:50:45 +02:00
Nikolay Kim
45d2fd4299 export frozen request related types; refactor code layout 2019-09-12 10:40:56 +06:00
Dmitry Pypin
8873e9b39e Added FrozenClientRequest for easier retrying HTTP calls (#1064)
* Initial commit

* Added extra_headers

* Added freeze() method to ClientRequest which produces a 'read-only' copy of a request suitable for retrying the send operation

* Additional methods for FrozenClientRequest

* Fix

* Increased crates versions

* Fixed a unit test. Added one more unit test.

* Added RequestHeaderWrapper

* Small fixes

* Renamed RequestHeadWrapper->RequestHeadType

* Updated CHANGES.md files

* Small fix

* Small changes

* Removed *_extra methods from Connection trait

* Added FrozenSendBuilder

* Added FrozenSendBuilder

* Minor fix

* Replaced impl Future with concrete Future implementation

* Small renaming

* Renamed Send->SendBody
2019-09-10 10:29:32 +06:00
Nikolay Kim
55179d6ab2 update dependencies 2019-08-13 10:48:11 -07:00
Nikolay Kim
4092c7f326 clippy warnings 2019-07-17 15:08:30 +06:00
Alec Moskvin
d2eb1edac3 Actix-web client: Always append a colon after username in basic auth (#949)
* Always append a colon after username in basic auth

* Update CHANGES.md
2019-07-01 09:34:42 +06:00
Nikolay Kim
2e19f572ee add tests for camel case headers rendering 2019-04-24 11:27:57 -07:00
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
Nikolay Kim
fc9b14a933 allow to specify server address for http and ws requests 2019-04-19 18:03:44 -07:00
Nikolay Kim
bfe0df5ab0 update tests 2019-04-18 21:28:23 -07:00
Nikolay Kim
b64851c5ec enable runtime for test:: methods 2019-04-17 10:28:27 -07:00
Nikolay Kim
cc8420377e pass request ownership to closure instead of ref 2019-04-16 15:43:55 -07:00
Nikolay Kim
ab4fda6084 update tests 2019-04-14 20:20:33 -07:00
Nikolay Kim
6bc1a0c76b Do not set default headers for websocket request 2019-04-14 07:43:53 -07:00
Nikolay Kim
b1547bbbb6 do not set default headers 2019-04-08 11:09:57 -07:00
Nikolay Kim
748289f0ff use custom headers map; more optimizations 2019-04-06 15:02:02 -07:00
nasa
a655bdac52 Fix clippy warning (#755) 2019-04-05 12:34:24 +03:00
Nikolay Kim
f100976ef0 rename close_connection to force_close 2019-04-02 14:08:30 -07:00
Nikolay Kim
e282ef7925 return back consuming builder 2019-04-02 12:51:16 -07:00
Nikolay Kim
1bd0995d7a remove unneded & 2019-04-01 18:00:38 -07:00
Nikolay Kim
2d43489278 ClientRequest::json() accepts reference instead of object 2019-04-01 17:53:30 -07:00
Nikolay Kim
38afc93304 Use non-consuming builder pattern for ClientRequest 2019-04-01 15:19:34 -07:00
Nikolay Kim
6c195d8521 add Derev<Target=RequestHead> for ClientRequest 2019-04-01 10:26:25 -07:00
Nikolay Kim
d846328f36 fork cookie crate 2019-03-29 21:13:39 -07:00
Nikolay Kim
e9bbde6832 allow to override request's uri 2019-03-29 16:28:28 -07:00
Nikolay Kim
744d82431d add per request timeout 2019-03-29 14:07:37 -07:00
Nikolay Kim
1e7096a63a add request timeout 2019-03-28 22:33:41 -07:00
Nikolay Kim
ea4d98d669 Session wide headers, basic and bearer auth 2019-03-28 21:48:35 -07:00
Nikolay Kim
5795850bbb decompress payload in cpu threadpool 2019-03-28 11:08:24 -07:00
Nikolay Kim
c59937784e add client websockets support 2019-03-27 18:53:19 -07:00