mirror of
https://github.com/actix/actix-website
synced 2025-06-29 08:14:58 +02:00
fix chunked example
This commit is contained in:
@ -71,16 +71,5 @@ The type `T` must implement the `Serialize` trait from *serde*.
|
||||
|
||||
{{< include-example example="responses" file="json_resp.rs" section="json-resp" >}}
|
||||
|
||||
# Chunked transfer encoding
|
||||
|
||||
Chunked encoding on a response can be enabled with `HttpResponseBuilder::chunked()`.
|
||||
This takes effect only for `Body::Streaming(BodyStream)` or `Body::StreamingContext` bodies.
|
||||
If the response payload compression is enabled and a streaming body is used, chunked encoding
|
||||
is enabled automatically.
|
||||
|
||||
> Enabling chunked encoding for *HTTP/2.0* responses is forbidden.
|
||||
|
||||
{{< include-example example="responses" file="chunked.rs" section="chunked" >}}
|
||||
|
||||
[responsebuilder]: https://docs.rs/actix-web/2/actix_web/dev/struct.HttpResponseBuilder.html
|
||||
[compressmidddleware]: https://docs.rs/actix-web/2/actix_web/middleware/struct.Compress.html
|
||||
|
Reference in New Issue
Block a user