DocuSign.RequestBuilder (DocuSign v3.1.1)
View SourceHelper functions for building Req requests
Summary
Functions
Add optional parameters to a request
Add non-optional parameters to a request
This function ensures that the body parameter is always set.
Handle the response for a Req request.
Specify the request method when building a request.
Specify the request url when building a request.
Functions
Add optional parameters to a request
Parameters
request(Map) - Collected request optionsdefinitions(Map) - Map of parameter name to parameter location.options(KeywordList) - The provided optional parameters
Returns
Map
Add non-optional parameters to a request
Parameters
request(Map) - Collected request optionslocation(atom) - Where to put the parameterkey(atom) - The name of the parametervalue(any) - The value of the parameter
Returns
Map
This function ensures that the body parameter is always set.
This handles cases where POST, PATCH and PUT requests require a body even when it's empty.
Parameters
request(Map) - Collected request options
Returns
Map
@spec evaluate_response({:ok, Req.Response.t()} | {:error, any()}, [ {integer(), any()} ]) :: {:ok, any()} | {:error, Req.Response.t()}
Handle the response for a Req request.
Parameters
response(Req.Response.t) - The response object
Returns
on success {:error, Req.Response.t} on failure
Specify the request method when building a request.
Does not override the method if one has already been specified.
Parameters
request(Map) - Collected request optionsmethod(atom) - Request method
Returns
Map
Specify the request url when building a request.
Does not override the url if one has already been specified.
Parameters
request(Map) - Collected request optionsurl(String) - Request URL
Returns
Map