Learn R Programming

gargle (version 0.3.0)

request_make: Make a Google API request

Description

Intended primarily for internal use in client packages that provide high-level wrappers for users. request_make() does very little: calls an HTTP method, only adding a user agent. Typically the input is created with request_build() and the output is processed with response_process().

Usage

request_make(x, ..., user_agent = gargle_user_agent())

Arguments

x

List. Holds the components for an HTTP request, presumably created with request_develop() or request_build(). Must contain a method and url. If present, body and token are used.

...

Optional arguments passed through to the HTTP method.

user_agent

A user agent string, prepared by httr::user_agent(). When in doubt, a client package should have an internal function that extends gargle_user_agent() by prepending its return value with the client package's name and version.

Value

Object of class response from httr.

See Also

Other requests and responses: request_develop, response_process

Examples

Run this code
# NOT RUN {
req <- gargle::request_build(
  method = "GET",
  path = "path/to/the/resource",
  token = "PRETEND_I_AM_TOKEN"
)
gargle::request_make(req)
# }

Run the code above in your browser using DataLab