Tesla.Middleware.Compression (tesla v1.5.0) View Source

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"

Link to this section Summary

Functions

Compress request.

Decompress response.

Link to this section Functions

Compress request.

It is used by Tesla.Middleware.CompressRequest.

Decompress response.

It is used by Tesla.Middleware.DecompressResponse.