1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-02 13:29:24 +00:00
Commit graph

54 commits

Author SHA1 Message Date
Rob Ede bcdde1d4ea
move actix-web to own dir 2022-02-01 00:30:41 +00:00
Rob Ede b4ff6addfe
use match name if possible in data debug log 2021-12-30 07:15:57 +00:00
Rob Ede 231a24ef8d
improve application data docs 2021-12-30 07:11:35 +00:00
Rob Ede 606a371ec3
improve Data docs 2021-12-06 17:14:56 +00:00
Rob Ede c7c02ef99d
body ergonomics v3 (#2468) 2021-12-04 19:40:47 +00:00
Ali MJ Al-Nasrawy ec6d284a8e
improve "data no configured" message (#2429) 2021-10-31 13:19:21 +00:00
James Rhodes 99985fc4ec
web: implement into_inner for Data<T: ?Sized> (#2407) 2021-10-12 18:35:33 +01:00
Arniu Tseng 8ae278cb68
Remove FromRequest::Config (#2233)
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-09-11 01:11:16 +01:00
Rob Ede 2d8d2f5ab0
app data doc improvements 2021-06-24 15:10:51 +01:00
Rob Ede 12f7720309
deprecate App::data and App::data_factory (#2271) 2021-06-22 15:50:58 +01:00
Rob Ede 532f7b9923
refined error model (#2253) 2021-06-17 17:57:58 +01:00
Rob Ede 2a8c650f2c
move internalerror to actix web (#2215) 2021-05-14 16:40:00 +01:00
Rob Ede c54a0713de
migrate integration testing to new crate (#2112) 2021-04-02 08:26:59 +01:00
Rob Ede c8ed8dd1a4
migrate to -utils beta 4 (#2127) 2021-04-01 15:26:13 +01:00
Rob Ede 3188ef5731
don't use rust annotation on code doc blocks 2021-03-25 08:45:52 +00:00
Rob Ede 2d3a0d6038
json method receives plain serialize (#2052) 2021-03-07 22:11:39 +00:00
Rob Ede 31d9ed81c5
change rustfmt line width to 96 2021-02-11 23:03:17 +00:00
Rob Ede 77efc09362
hide httpmessage mod 2021-02-11 22:58:40 +00:00
fakeshadow 41bc04b1c4
Use immutable reference of service state. Update awc dns resolver. (#1905) 2021-02-07 01:00:40 +00:00
Rob Ede da69bb4d12
implement App::data as App::app_data(Data::new(T))) (#1906) 2021-01-15 23:37:33 +00:00
Rob Ede d45a1aa6b6
Add web::ReqData<T> extractor (#1748)
Co-authored-by: Jonas Platte <jonas@lumeo.com>
2020-10-24 18:49:50 +01:00
cquintana-verbio 98243db9f1
Print unconfigured Data<T> type when attempting extraction (#1743)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2020-10-20 17:35:34 +01:00
PeterUlb b5812b15f0
Remove Sized Bound for web::Data (#1712) 2020-09-29 22:44:12 +01:00
Yuki Okushi 92b5bcd13f
Check format and tweak CI config (#1619) 2020-07-22 00:28:33 +01:00
Yuki Okushi a98e53ecb8
web: Minimize futures dependencies 2020-05-19 08:29:12 +09:00
Sven Allers 201090d7a2
Provide impl<T> From<Arc<T>> for Data<T> (#1509) 2020-05-16 00:27:03 +01:00
Rob Ede c27d3fad8e
clarify resource/scope app data overriding (#1476)
* relocate FnDataFactory

* clarify app data overriding in Scope and Resource

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-04-30 02:20:47 +09:00
Nikolay Kim 7882f545e5 Allow to gracefully stop test server via TestServer::stop() 2019-12-25 12:10:48 +04:00
Nikolay Kim e5a50f423d Make web::Data deref to Arc<T> #1214 2019-12-20 17:45:35 +06:00
Nikolay Kim c877840c07 rename App::register_data to App::app_data and HttpRequest::app_data returns Option<&T> instead of Option<&Data<T>> 2019-12-20 17:13:09 +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 3127dd4db6 migrate actix-web to std::future 2019-11-21 16:02:17 +06:00
Erlend Langseth a07cdd6533 Data::into_inner 2019-08-27 17:25:25 +01:00
Ravi Shankar 32718b7e31 Expose factory traits and some clippy fixes (#983) 2019-07-17 12:58:42 +06:00
Joe Roberts d7780d53c9 Fix typo in actix_web::web::Data::get_ref docstring (#921) 2019-06-18 07:27:23 +06:00
Nikolay Kim d9a62c4bbf add App::register_data() 2019-06-05 08:43:39 +06:00
Nikolay Kim e9cbcbaf03 update dependencies 2019-05-12 10:18:02 -07:00
Nikolay Kim 45c05978b0 Allow to set/override app data on scope level 2019-05-12 09:42:05 -07:00
Nikolay Kim fa78da8156 unify route and app data, it allows to provide global extractor config #775 2019-05-04 19:43:49 -07:00
Nikolay Kim 29a841529f Allow to construct Data instances to avoid double Arc for Send + Sync types. 2019-04-29 09:26:12 -07:00
Nikolay Kim f9078d41cd add test::read_response; fix TestRequest::app_data() 2019-04-14 19:52:12 -07:00
Nikolay Kim ee33f52736 make extractor config type explicit 2019-04-13 16:35:25 -07:00
Nikolay Kim 4f30fa9d46 Remove generic type for request payload, always use default 2019-04-13 14:50:54 -07:00
Nikolay Kim 7801fcb993 update migration 2019-04-10 20:47:28 -07:00
Nikolay Kim 52aebb3bca fmt 2019-04-10 15:05:03 -07:00
Darin 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
Nikolay Kim 9d82d4dfb9 Fix body propagation in Response::from_error. #760 2019-04-10 12:43:31 -07:00
Nikolay Kim 75b213a6f0 refactor FromRequest trait 2019-04-07 14:43:07 -07:00