google_gax v0.1.1 GoogleApi.Gax.Request View Source

This module is used to build an HTTP request

Link to this section Summary

Functions

Add optional parameters to the request

Add optional parameters to the request

Specify the request method when building a request

Specify the request method when building a request

Link to this section Types

Link to this type method() View Source
method() :: :head | :get | :delete | :trace | :options | :post | :put | :patch
Link to this type param_location() View Source
param_location() :: :body | :query | :header | :file
Link to this type t() View Source
t() :: %GoogleApi.Gax.Request{
  body: keyword(),
  file: keyword(),
  header: keyword(),
  method: method(),
  query: keyword(),
  url: String.t()
}

Link to this section Functions

Link to this function add_optional_params(request, definitions, list) View Source
add_optional_params(
  GoogleApi.Gax.Request.t(),
  %{optional(atom()) => param_location()},
  keyword()
) :: GoogleApi.Gax.Request.t()

Add optional parameters to the request

Parameters

  • request (Map) - Collected request options
  • definitions (Map) - Map of parameter name to parameter location.
  • options (KeywordList) - The provided optional parameters

Returns

Map

Link to this function add_param(request, location, key, values) View Source

Add optional parameters to the request

Parameters

  • request (Map) - Collected request options
  • location (atom) - Where to put the parameter
  • key (atom) - The name of the parameter
  • value (any) - The value of the parameter

Returns

Map

Link to this function method(request) View Source
method(GoogleApi.Gax.Request.t()) :: {:ok, atom()} | :error

Specify the request method when building a request

Parameters

  • request (Map) - Collected request options
  • m (String) - Request method

Returns

Map

Specify the request method when building a request

Parameters

  • request (Map) - Collected request options
  • u (String) - Request URL

Returns

Map