Reqord.Replay (reqord v0.4.0)

View Source

Handles replaying HTTP requests from cassettes.

Summary

Functions

Loads the response body based on the encoding type and storage method.

Replays a response from a cassette entry with support for different body encodings.

Functions

load_response_body(resp)

@spec load_response_body(Reqord.CassetteEntry.Response.t()) ::
  {:ok, binary()} | {:error, String.t()}

Loads the response body based on the encoding type and storage method.

replay_response(conn, entry)

@spec replay_response(Plug.Conn.t(), Reqord.CassetteEntry.t()) :: Plug.Conn.t()

Replays a response from a cassette entry with support for different body encodings.