1
0
mirror of https://github.com/actix/examples synced 2025-06-28 09:50:36 +02:00

upgrade to alpha.6

This commit is contained in:
Nikolay Kim
2019-04-14 10:34:41 -07:00
parent 8fb2bf6869
commit 09b0188ff9
13 changed files with 93 additions and 117 deletions

View File

@ -12,7 +12,6 @@
// - POSTing json body
// 3. chaining futures into a single response used by an asynch endpoint
#[macro_use]
extern crate validator_derive;
#[macro_use]
@ -47,8 +46,6 @@ struct HttpBinResponse {
url: String,
}
/// post json to httpbin, get it back in the response body, return deserialized
fn step_x(
data: SomeData,
@ -93,12 +90,9 @@ fn main() -> io::Result<()> {
println!("Starting server at: {:?}", endpoint);
HttpServer::new(|| {
App::new()
.data(Client::default())
.service(
web::resource("/something")
.route(web::post().to_async(create_something)),
)
App::new().data(Client::default()).service(
web::resource("/something").route(web::post().to_async(create_something)),
)
})
.bind(endpoint)?
.run()