1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 01:51:23 +02:00

use Params object for query

This commit is contained in:
Nikolay Kim
2017-12-27 19:02:29 -08:00
parent 19e1c1b75b
commit 6bb893deab
3 changed files with 24 additions and 13 deletions

View File

@ -146,9 +146,9 @@ and:
/{foo}/bar/baz
```
A *variable part*(replacement marker) is specified in the form *{identifier}*,
A *variable part* (replacement marker) is specified in the form *{identifier}*,
where this means "accept any characters up to the next slash character and use this
as the name in the `HttpRequest.match_info` object".
as the name in the `HttpRequest.match_info()` object".
A replacement marker in a pattern matches the regular expression `[^{}/]+`.

View File

@ -262,14 +262,14 @@ At the same time *Payload* implements *Stream* trait, so it could be used with v
stream combinators. Also *Payload* provides serveral convinience methods that return
future object that resolve to Bytes object.
* *readany* method returns *Stream* of *Bytes* objects.
* *readany()* method returns *Stream* of *Bytes* objects.
* *readexactly* method returns *Future* that resolves when specified number of bytes
* *readexactly()* method returns *Future* that resolves when specified number of bytes
get received.
* *readline* method returns *Future* that resolves when `\n` get received.
* *readline()* method returns *Future* that resolves when `\n` get received.
* *readuntil* method returns *Future* that resolves when specified bytes string
* *readuntil()* method returns *Future* that resolves when specified bytes string
matches in input bytes stream
In this example handle reads request payload chunk by chunk and prints every chunk.