1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-09-21 02:50:10 +00:00
Commit graph

32 commits

Author SHA1 Message Date
fakeshadow
d40ae8c8ca
use sync method on Responder trait (#1891) 2021-01-08 22:17:19 +00:00
Rob Ede
21f6c9d7a5
improve code readability 2021-01-04 00:49:02 +00:00
Rob Ede
4100c50c70
add either extractor (#1788) 2020-11-20 18:02:41 +00:00
Yuki Okushi
92b5bcd13f
Check format and tweak CI config (#1619) 2020-07-22 00:28:33 +01:00
Taiki Endo
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
Yuki Okushi
a98e53ecb8
web: Minimize futures dependencies 2020-05-19 08:29:12 +09:00
Nikolay Kim
6c9f9fff73 clippy warnings 2019-12-08 00:46:51 +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
Jim Blandy
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
Nikolay Kim
8683ba8bb0 rename .to_async() to .to() 2019-11-21 21:36:35 +06:00
Nikolay Kim
1f0577f8d5 cleanup api doc examples 2019-11-21 16:02:17 +06:00
Nikolay Kim
3127dd4db6 migrate actix-web to std::future 2019-11-21 16:02:17 +06:00
Nikolay Kim
7b1dcaffda cleanup deprecation warning for Box<dyn> 2019-07-17 11:44:39 +06:00
Nikolay Kim
c45728ac01 prep test server release 2019-07-16 10:21:52 +06:00
messense
b1143168e5 Impl Responder for (T, StatusCode) where T: Responder (#954) 2019-07-11 14:42:58 +06:00
Darin
7300002226 grammar fixes (#796) 2019-04-24 13:21:42 -07:00
Nikolay Kim
679d1cd513 allow to override responder's status code and headers 2019-04-24 10:25:46 -07:00
Nikolay Kim
b64851c5ec enable runtime for test:: methods 2019-04-17 10:28:27 -07:00
Nikolay Kim
bca31eb7ad remove Deref 2019-04-02 13:35:01 -07:00
Nikolay Kim
9bd0f29ca3 add tests for error and some responders 2019-03-17 10:11:10 -07:00
Nikolay Kim
c14c66d2b0 add json extractor tests 2019-03-17 09:52:41 -07:00
Nikolay Kim
b550f9ecf4 update imports 2019-03-17 01:08:56 -07:00
Nikolay Kim
86405cfe7a more tests 2019-03-12 22:57:09 -07:00
Nikolay Kim
eef687ec80 remove unneeded methods 2019-03-07 15:51:24 -08:00
Nikolay Kim
fe22e83144 refactor service registration process; unify services and resources 2019-03-06 15:47:15 -08:00
Nikolay Kim
1a80b70868 add Responder impl for InternalError 2019-03-05 19:41:50 -08:00
Nikolay Kim
bd4124587a provide block_on function for testing purpose 2019-03-04 13:25:35 -08:00
Nikolay Kim
5c61321565 fix state factory support, tests for state and state factory 2019-03-03 21:40:03 -08:00
Nikolay Kim
e50d4c5e0e rename extractor module to extract, re-enable doc tests 2019-03-03 13:53:31 -08:00
Nikolay Kim
fdf3011837 add responder for unit type 2019-03-02 09:05:07 -08:00
Nikolay Kim
2d7293aaf8 copy actix-web2 2019-03-01 22:51:32 -08:00