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

Compress requests and decompress responses.

Supports "gzip" and "deflate" encodings using erlang's built-in :zlib module.

Example usage

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.