1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-02 09:14:32 +02:00
Commit Graph

38 Commits

Author SHA1 Message Date
3188ef5731 don't use rust annotation on code doc blocks 2021-03-25 08:45:52 +00:00
746d983849 handle header error with CustomResponder (#2093) 2021-03-20 05:18:06 +00:00
31d9ed81c5 change rustfmt line width to 96 2021-02-11 23:03:17 +00:00
41bc04b1c4 Use immutable reference of service state. Update awc dns resolver. (#1905) 2021-02-07 01:00:40 +00:00
b1dd8d28bc response header rework (#1869) 2021-01-15 02:11:10 +00:00
6575ee93f2 big clean up and docs improvmenet of types mod (#1894) 2021-01-09 13:17:19 +00:00
d40ae8c8ca use sync method on Responder trait (#1891) 2021-01-08 22:17:19 +00:00
21f6c9d7a5 improve code readability 2021-01-04 00:49:02 +00:00
4100c50c70 add either extractor (#1788) 2020-11-20 18:02:41 +00:00
92b5bcd13f Check format and tweak CI config (#1619) 2020-07-22 00:28:33 +01:00
6c5c4ea230 Remove uses of pin_project::project attribute
pin-project will deprecate the project attribute due to some unfixable
limitations.

Refs: https://github.com/taiki-e/pin-project/issues/225
2020-06-06 06:44:14 +09:00
a98e53ecb8 web: Minimize futures dependencies 2020-05-19 08:29:12 +09:00
6c9f9fff73 clippy warnings 2019-12-08 00:46:51 +06:00
205a964d8f upgrade to tokio 0.2 2019-12-05 23:35:43 +06:00
4dc31aac93 use actix_rt::test for test setup 2019-11-26 11:25:50 +06:00
c5907747ad Remove implementation of Responder for (). Fixes #1108.
Rationale:

- In Rust, one can omit a semicolon after a function's final expression to make
  its value the function's return value. It's common for people to include a
  semicolon after the last expression by mistake - common enough that the Rust
  compiler suggests removing the semicolon when there's a type mismatch between
  the function's signature and body. By implementing Responder for (), Actix makes
  this common mistake a silent error in handler functions.

- Functions returning an empty body should return HTTP status 204 ("No Content"),
  so the current Responder impl for (), which returns status 200 ("OK"), is not
  really what one wants anyway.

- It's not much of a burden to ask handlers to explicitly return
  `HttpResponse::Ok()` if that is what they want; all the examples in the
  documentation do this already.
2019-11-23 21:10:02 +06:00
8683ba8bb0 rename .to_async() to .to() 2019-11-21 21:36:35 +06:00
1f0577f8d5 cleanup api doc examples 2019-11-21 16:02:17 +06:00
3127dd4db6 migrate actix-web to std::future 2019-11-21 16:02:17 +06:00
7b1dcaffda cleanup deprecation warning for Box<dyn> 2019-07-17 11:44:39 +06:00
c45728ac01 prep test server release 2019-07-16 10:21:52 +06:00
b1143168e5 Impl Responder for (T, StatusCode) where T: Responder (#954) 2019-07-11 14:42:58 +06:00
7300002226 grammar fixes (#796) 2019-04-24 13:21:42 -07:00
679d1cd513 allow to override responder's status code and headers 2019-04-24 10:25:46 -07:00
b64851c5ec enable runtime for test:: methods 2019-04-17 10:28:27 -07:00
bca31eb7ad remove Deref 2019-04-02 13:35:01 -07:00
9bd0f29ca3 add tests for error and some responders 2019-03-17 10:11:10 -07:00
c14c66d2b0 add json extractor tests 2019-03-17 09:52:41 -07:00
b550f9ecf4 update imports 2019-03-17 01:08:56 -07:00
86405cfe7a more tests 2019-03-12 22:57:09 -07:00
eef687ec80 remove unneeded methods 2019-03-07 15:51:24 -08:00
fe22e83144 refactor service registration process; unify services and resources 2019-03-06 15:47:15 -08:00
1a80b70868 add Responder impl for InternalError 2019-03-05 19:41:50 -08:00
bd4124587a provide block_on function for testing purpose 2019-03-04 13:25:35 -08:00
5c61321565 fix state factory support, tests for state and state factory 2019-03-03 21:40:03 -08:00
e50d4c5e0e rename extractor module to extract, re-enable doc tests 2019-03-03 13:53:31 -08:00
fdf3011837 add responder for unit type 2019-03-02 09:05:07 -08:00
2d7293aaf8 copy actix-web2 2019-03-01 22:51:32 -08:00