get_response: Print or return the API call response

Description Usage Arguments Details Value

Description

There are two parts in response: response status and response content. The status report whether the request is success, and the content is the return value of API call.

Usage

1
get_response(res, content_echo = TRUE)

Arguments

res

response object

content_echo

whether to print request content in console

Details

Run function without assigning return value will print both status and response in console. Assigning return value will only print the status in console, then save the content in prettified json format.

Function will stop for http error.

Value

The response object in prettified json format


dracodoc/rCartoAPI documentation built on May 15, 2019, 1:52 p.m.