View Source Tesla.Middleware.Compression (tesla v1.11.2)
Compress requests and decompress responses.
Supports "gzip" and "deflate" encodings using Erlang's built-in :zlib
module.
Examples
defmodule MyClient do
use Tesla
plug Tesla.Middleware.Compression, format: "gzip"
end
Options
:format
- request compression format,"gzip"
(default) or"deflate"
Summary
Functions
Compress request.
It is used by Tesla.Middleware.CompressRequest
.
Decompress response.
It is used by Tesla.Middleware.DecompressResponse
.