1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 08:45:10 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
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
3127dd4db6 migrate actix-web to std::future 2019-11-21 16:02:17 +06:00
a07cdd6533 Data::into_inner 2019-08-27 17:25:25 +01:00
32718b7e31 Expose factory traits and some clippy fixes (#983) 2019-07-17 12:58:42 +06:00
d7780d53c9 Fix typo in actix_web::web::Data::get_ref docstring (#921) 2019-06-18 07:27:23 +06:00
d9a62c4bbf add App::register_data() 2019-06-05 08:43:39 +06:00
e9cbcbaf03 update dependencies 2019-05-12 10:18:02 -07:00
45c05978b0 Allow to set/override app data on scope level 2019-05-12 09:42:05 -07:00
fa78da8156 unify route and app data, it allows to provide global extractor config #775 2019-05-04 19:43:49 -07:00
29a841529f Allow to construct Data instances to avoid double Arc for Send + Sync types. 2019-04-29 09:26:12 -07:00
f9078d41cd add test::read_response; fix TestRequest::app_data() 2019-04-14 19:52:12 -07:00
ee33f52736 make extractor config type explicit 2019-04-13 16:35:25 -07:00
4f30fa9d46 Remove generic type for request payload, always use default 2019-04-13 14:50:54 -07:00
7801fcb993 update migration 2019-04-10 20:47:28 -07:00
52aebb3bca fmt 2019-04-10 15:05:03 -07:00
6ab9838977 added some error logging for extractors: Data, Json, Query, and Path (#765)
* added some error logging for extractors

* changed log::error to log::debug and fixed position of log for path

* added request path to debug logs
2019-04-10 12:45:13 -07:00
9d82d4dfb9 Fix body propagation in Response::from_error. #760 2019-04-10 12:43:31 -07:00
75b213a6f0 refactor FromRequest trait 2019-04-07 14:43:07 -07:00
bca31eb7ad remove Deref 2019-04-02 13:35:01 -07:00
e396c90c9e update api doc 2019-03-16 21:13:16 -07:00
60386f1791 introduce RouteData extractor 2019-03-16 21:09:11 -07:00
b1e267bce4 rename State to a Data 2019-03-16 20:17:27 -07:00