1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-11 01:39:33 +00:00
Commit graph

183 commits

Author SHA1 Message Date
Rob Ede bcdde1d4ea
move actix-web to own dir 2022-02-01 00:30:41 +00:00
Rob Ede b3e84b5c4b
tweak default_service docs 2022-01-28 20:53:51 +00:00
Luca Palmieri a3416112a5
Improve the documentation for default_service (#2614) 2022-01-28 20:31:54 +00:00
Rob Ede d7c5c966d2
remove impl Future for HttpResponse (#2601) 2022-01-24 11:56:01 +00:00
Rob Ede edbb9b047e
prepare actix-router release 0.5.0-rc.1 2022-01-14 19:59:36 +00:00
Ali MJ Al-Nasrawy c3ce33df05
unify generics across App, Scope and Resource (#2572)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-01-05 15:02:28 +00:00
Rob Ede 231a24ef8d
improve application data docs 2021-12-30 07:11:35 +00:00
Ali MJ Al-Nasrawy 554ae7a868
rework Handler trait (#2549) 2021-12-27 00:44:30 +00:00
Rob Ede 2e493cf791
remove crate level clippy allows 2021-12-25 04:53:51 +00:00
Rob Ede 5860fe5381
expose Handler trait 2021-12-25 04:43:59 +00:00
Rob Ede adf9935841
improve scope documentation
closes #2389
2021-12-25 03:44:09 +00:00
Rob Ede cd025f5c0b
allow any body type in Resource (#2526) 2021-12-22 15:00:32 +00:00
Rob Ede 40a0162074
add tests to scope and resource for returning from fns 2021-12-22 07:58:37 +00:00
Rob Ede 11ee8ec3ab
align remaining header map terminology (#2510) 2021-12-13 16:08:08 +00:00
Rob Ede 2d053b7036
remove actix_http::http module (#2488) 2021-12-05 14:37:20 +00:00
Rob Ede c7c02ef99d
body ergonomics v3 (#2468) 2021-12-04 19:40:47 +00:00
Rob Ede f6e69919ed
update to router 0.5.0 beta (#2339) 2021-08-06 22:42:31 +01:00
Rob Ede 293c52c3ef
re-export ServiceFactory (#2325) 2021-07-12 16:55:41 +01:00
Igor Aleksanov 262c6bc828
Various refactorings (#2281)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-06-26 15:33:43 +01:00
Rob Ede 539697292a
fix scope and resource middleware data access (#2288) 2021-06-25 13:19:42 +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 23e0c9b6e0
remove http-codes builders from actix-http (#2159) 2021-04-14 02:00:14 +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
fakeshadow 351286486c
fix clippy warning on nightly (#2088)
* fix clippy warning on nightly
2021-03-19 19:25:35 +08:00
fakeshadow 69dd1a9bd6
Remove ConnectionLifetime trait. Simplify Acquired handling (#2072) 2021-03-16 02:56:23 +00:00
Rob Ede 31d9ed81c5
change rustfmt line width to 96 2021-02-11 23:03:17 +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
fakeshadow 530d03791d
refactor Resource (#1883) 2021-01-09 03:36:58 +00:00
fakeshadow 32de9f8840
Tokio 1.0 (#1813)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-01-03 23:47:04 +00:00
fakeshadow ad608aa64e
optimize Resource and Scope service call (#1867) 2021-01-02 19:40:31 +00:00
Ibraheem Ahmed cbda928a33
Rename factory to handler (#1852) 2020-12-26 21:46:19 +00: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
Rob Ede f3b0233477
use mem::take where possible (#1507) 2020-05-17 10:54:42 +09:00
Rob Ede 879cad9422
allow parent data containers to be accessed from child scopes 2020-05-09 00:31:26 +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
Rob Ede 5b0f7fff69
fix spelling errors in doc comments 2020-04-21 04:09:35 +01:00
Rob Ede 45e2e40140
set data container on default service calls
closes #1450
2020-04-14 02:33:19 +01:00
Nikolay Kim 7b3c99b933 prep actix-framed release 2019-12-25 20:17:22 +04:00
Nikolay Kim f86ce0390e allow to specify multi pattern for resources 2019-12-25 20:14:44 +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 6c9f9fff73 clippy warnings 2019-12-08 00:46:51 +06:00
Nikolay Kim 068f047dd5 update service factory config 2019-12-02 21:37:13 +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