request: Arbitrary Request

View source: R/connection.R

requestR Documentation

Arbitrary Request

Description

Perform an arbitrary GET, POST or DELETE function using a connection object.

Usage

request(
  conn,
  rtype = c("GET", "POST", "DELETE"),
  uri_keys = NULL,
  uri_args = NULL,
  headers = NULL,
  body = NULL,
  jsondata = NULL
)

Arguments

conn

A connection object generated by connect

rtype

A string indicating the kind of HTTP request to be performed - accepts GET, POST and DELETE

uri_keys

A two-element string vector indicating which URI to use - see common.R

uri_args

A list of arguments to be passed to the URI

headers

A list of headers to be used by the GET/POST/DELETE request, per the .headers argument

body

A string, indicating the body to be passed to the request. Do not pass this and jsondata simultaneously.

jsondata

A string, indicating the JSON body to be passed. See above.

Details

For advanced users only, this function allows you to perform an arbitrary GET, POST or DELETE request on the low-level API. Allows for full configurability of the request, including setting the keys, arguments, headers, and JSON payload.

Value

Returns the raw GET/POST/DELETE output from the request.


ge-flight-analytics/Rems documentation built on May 17, 2023, 8:02 a.m.