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
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
57da1d3c0f
refactor app_service ( #1877 )
2021-01-06 11:35:30 +00:00
Rob Ede
21f6c9d7a5
improve code readability
2021-01-04 00:49:02 +00:00
fakeshadow
32de9f8840
Tokio 1.0 ( #1813 )
...
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-01-03 23:47:04 +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
92b5bcd13f
Check format and tweak CI config ( #1619 )
2020-07-22 00:28:33 +01:00
Rob Ede
a70e599ff5
re-export rt in web and add main macro ( #1575 )
2020-06-22 20:09:48 +01:00
Yuki Okushi
6dd78d9355
Run rustfmt
2020-05-21 17:56:53 +09:00
Yuki Okushi
a98e53ecb8
web: Minimize futures
dependencies
2020-05-19 08:29:12 +09: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
bb17280f51
simplify data factory future polling ( #1473 )
...
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-04-29 15:38:53 +09:00
Rob Ede
5b0f7fff69
fix spelling errors in doc comments
2020-04-21 04:09:35 +01:00
Nikolay Kim
8b8a9a995d
bump ver
2019-12-20 17:36:48 +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
a08d8dab70
AppConfig::secure() is always false. #1202
2019-12-20 16:04:51 +06:00
Sameer Dhar
e4382e4fc1
Fix broken docs ( #1204 )
...
Fixed un escaped brackets in lib.rs, and reflowed links to ConnectionInfo in app, config, and server.rs
2019-12-09 10:02:43 +06:00
Nikolay Kim
4a8a9ef405
update tests and clippy warnings
2019-12-08 12:31:16 +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
2a2d7f5768
nightly clippy warnings
2019-07-17 15:53:51 +06:00
Nikolay Kim
af9fb5d190
Support asynchronous data factories #850
2019-06-28 10:43:52 +06:00
Nikolay Kim
d7ec241fd0
re-export identity and cors middleware
2019-06-15 21:47:06 +06:00
Nikolay Kim
d9a62c4bbf
add App::register_data()
2019-06-05 08:43:39 +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
Nikolai Vazquez
a77b0b054a
Make App::configure
take an FnOnce
( #825 )
2019-05-10 14:44:49 -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
f4b4875cb1
Add helper function for executing futures test::block_fn()
2019-04-29 09:34:14 -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
Darin
b51b5b763c
added clarification to docs regarding middleware processing sequence, added delete method to TestRequest ( #799 )
...
* added clarification to docs regarding middleware processing sequnce
* added delete method to TestRequest, doc, and test
2019-04-29 09:14:36 -07:00
Nikolay Kim
898ef57080
Fix async web::Data factory handling
2019-04-23 21:21:49 -07:00
Nikolay Kim
7a28b32f6d
Rename test::call_success to test::call_service
2019-04-15 07:44:07 -07:00
Nikolay Kim
09cdf1e302
Rename RouterConfig to ServiceConfig
2019-04-15 07:32:49 -07:00
Nikolay Kim
5bd5651faa
Allow to use any service as default service
2019-04-13 22:25:00 -07:00
Nikolay Kim
4f30fa9d46
Remove generic type for request payload, always use default
2019-04-13 14:50:54 -07:00
Nikolay Kim
9d82d4dfb9
Fix body propagation in Response::from_error. #760
2019-04-10 12:43:31 -07:00
Nikolay Kim
237bfba1ed
add App::configure() - allow to offload app configuration to different methods
2019-04-03 15:09:31 -07:00
Nikolay Kim
e282ef7925
return back consuming builder
2019-04-02 12:51:16 -07:00
dowwie
03dfbdfcdd
updated wrap and wrap fn descriptions, still requiring viable examples
2019-04-01 14:52:05 -04:00
dowwie
8800b8ef13
mentioned re-use in wrap doc
2019-04-01 09:59:21 -04:00
dowwie
220c04b7b3
added docs for wrap and wrap_fn
2019-04-01 09:30:11 -04:00
Nikolay Kim
724e9c2efb
replace deprecated fn
2019-03-30 07:56:09 -07:00