1
0
mirror of https://github.com/actix/actix-website synced 2025-08-21 05:15:42 +02:00

begin update of docs to actix-web 1.0

This commit is contained in:
Cameron Dershem
2019-06-12 04:51:45 -04:00
parent ad45f9e95a
commit 8aa39e1afb
9 changed files with 43 additions and 24 deletions

View File

@@ -27,6 +27,7 @@ actix-web = "{{< actix-version "actix-web" >}}"
In order to implement a web server, we first need to create a request handler.
<!-- TODO: Handler has been deprecated -->
A request handler is a function that accepts an `HttpRequest` instance as its only parameter
and returns a type that can be converted into `HttpResponse`:
@@ -34,12 +35,12 @@ Filename: `src/main.rs`
{{< include-example example="getting-started" section="setup" >}}
<!-- TODO: Return ->
Next, create an `Application` instance and register the request handler with
the application's `resource` on a particular *HTTP method* and *path* and
after that, the application instance can be used with `HttpServer` to listen
for incoming connections. The server accepts a function that should return an
`HttpHandler` instance. For simplicity `server::new` could be used, this
function is shortcut for `HttpServer::new`:
`HttpResponse`.
{{< include-example example="getting-started" section="main" >}}