An interceptor for Tesla.Adapter.Mint, Tesla's adapter for Mint.
Implementation notes:
- The response's body is returned as the
:body_asoption tells: as a binary with:plain, the default, or as a stream of one chunk with:stream.:chunksisn't supported for requests that fakes handle, and raises.:max_bodyapplies like in the adapter. - Like in the adapter, an empty response body is
nilwith:plain. - A request body from a stream, a function or a
Tesla.Multipartreaches the fakes whole. Loopback.HTTPErrorreasons are returned the way the adapter returns them::timeoutas:timeout,:closedas"Encounter Mint error %Mint.TransportError{reason: :closed}", and the other reasons as%Mint.TransportError{}.- The options that control the connection, like
:connand:timeout, apply only to requests passed through.