google_gax v0.1.1 GoogleApi.Gax.Response View Source
This module helps decode Tesla responses
Link to this section Summary
Functions
Handle the response for a Tesla request
Link to this section Functions
Link to this function
decode(env, opts \\ [])
View Source
decode({:ok, Tesla.Env.t()}, keyword()) :: {:ok, struct()} | {:error, Tesla.Env.t()}
Handle the response for a Tesla request
Parameters
- response ({:ok, Tesla.Env} | {:error, reason}) - The response object
- struct (struct | false) - The shape of the struct to deserialize into. If false, returns the Tesla response.
opts (KeywordList) - [optional] Optional parameters
- :dataWrapped (boolean()): If true, the remove the wrapping “data” field. Defaults to false.
- :decode (boolean()): If false, returns the entire reponse. Defaults to true.
- :struct (module)
Returns
{:ok, struct} on success {:error, info} on failure