tesla v0.10.0 Tesla.Middleware.Compression View Source

Compress requests and decompress responses.

Supports “gizp” 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 "defalte"

Link to this section Summary

Link to this section Functions

Callback implementation for Tesla.Middleware.call/3.

Compress request, used by Tesla.Middleware.CompressRequest