google_gax v0.3.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 Sourcedecode({:ok, Tesla.Env.t()}, keyword()) ::
{:ok, struct()} | {:error, Tesla.Env.t()}
Handle the response for a Tesla request
Parameters
response(type:{:ok, Tesla.Env.t} | {:error, reason}) - The response objectopts(type:keyword()) - [optional] Optional parameters:dataWrapped(type:boolean()) - If true, the remove the wrapping "data" field. Defaults to false.:decode(type:boolean()) - If false, returns the entire reponse. Defaults to true.:struct(type:module)
Returns
{:ok, struct()}on success{:error, Tesla.Env.t}on failure