Learn R Programming

BMRSr (version 1.0.0)

send_request: Send an API request (basically a wrapper to httr:GET that adds a marker for the data item)

Description

Send an API request (basically a wrapper to httr:GET that adds a marker for the data item)

Usage

send_request(request, config_options = list())

Arguments

request

list; a named list with at least a url to be sent and the data item contained within (most easily generated from build_call())

config_options

list; a named list of config options to be passed to httr::GET

Value

A response() object with an added data_item attribute

Examples

Run this code
# NOT RUN {
send_request(
build_call(data_item = "TEMP", from_date = "01 Jun 2019", to_date = "10 Jun 2019", api_key = "test")
)
# }

Run the code above in your browser using DataLab