Rob Ede
668a33c793
remove internal usage of Body
2021-11-16 22:10:30 +00:00
Rob Ede
93112644d3
non exhaustive content encoding ( #2377 )
2021-09-01 09:53:26 +01:00
Ali MJ Al-Nasrawy
f9da6e48e0
ResourceDef: define behavior for prefix with trailing slash ( #2355 )
...
* ResourceDef: define behavior
* fix tests
* add scope test
* revert firestorm bump
* update changelog
* fmt
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-08-30 20:05:49 +01:00
Rob Ede
f6e69919ed
update to router 0.5.0 beta ( #2339 )
2021-08-06 22:42:31 +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
900c9e270e
remove responsebody indirection from response ( #2201 )
2021-05-09 20:12:48 +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
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
Rob Ede
991363a104
consistent case s/web/Web
2021-02-10 12:12:03 +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
9e401b6ef7
refactor Scope ( #1895 )
2021-01-09 18:06:49 +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
Augusto César Dias
7030bf5fe8
Adding app_data to ServiceConfig ( #1758 )
...
Co-authored-by: Rob Ede <robjtede@icloud.com>
Co-authored-by: Augusto <augusto@flowciety.de>
2020-10-26 17:02:45 +00:00
Jonas Platte
d765e9099d
Fix clippy::rc_buffer ( #1728 )
2020-10-10 09:26:05 +09:00
Yuki Okushi
c2c71cc626
Fix/suppress clippy warnings ( #1720 )
2020-10-01 18:19:09 +09:00
Rob Ede
cf5138e740
fix clippy async_yields_async lints ( #1667 )
2020-09-11 11:29:17 +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
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
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
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
d9af8f66ba
Use actix-testing for testing utils
2019-09-25 10:28:41 +06:00
Jim Blandy
58c7065f08
Implement register_data
method on Resource
and Scope
. ( #1094 )
...
* Implement `register_data` method on `Resource` and `Scope`.
* Split Scope::register_data tests out from Scope::data tests.
* CHANGES.md: Mention {Scope,Resource}::register_data.
2019-09-18 06:36:39 +06:00
Nikolay Kim
2a2d7f5768
nightly clippy warnings
2019-07-17 15:53:51 +06:00
Ravi Shankar
32718b7e31
Expose factory traits and some clippy fixes ( #983 )
2019-07-17 12:58:42 +06:00
Nikolay Kim
7b1dcaffda
cleanup deprecation warning for Box<dyn>
2019-07-17 11:44:39 +06:00
Nikolay Kim
d293ae2a69
fix nested resource map registration #915
2019-06-15 22:12:20 +06:00
Nikolay Kim
0e138e111f
add external resource support on scope level
2019-06-03 23:41:32 +06:00
Denys Vitali
1fce4876f3
Scope configuration ( #880 )
...
* WIP: Scope configuarion
* Extensions: Fix into_iter()
* Scope: Fix tests
* Add ScopeConfig to web
Committing from mobile, if this doesn't look good it's because I haven't tested it...
* Scope Config: Use ServiceConfig instead
* Scope: Switch to ServiceConfig in doc
* ScopeConfig: Remove unnecessary changes, handle the case when data is empty
* ScopeConfig: Remove changes from actix-http
2019-06-03 23:12:37 +06:00
Nikolay Kim
45c05978b0
Allow to set/override app data on scope level
2019-05-12 09:42:05 -07:00
Nikolay Kim
df08baf67f
update actix-net dependencies
2019-05-12 08:34:51 -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
70a4c36496
use Error explicitly
2019-04-25 11:14:32 -07:00