callCurl: a wrapper of the httr GET/POST functions

Description Usage Arguments Value

View source: R/callCurl.R

Description

The function offers a basic functionality of commands GET/POST from httr package to communicate with the APIs. If needed, the proxy settings can be given explicitly, or set in global variables rejustify.proxyUrl and rejustify.proxyPort.

Usage

1
2
3
4
5
6
7
callCurl(
  method = "GET",
  url = NULL,
  body = NULL,
  proxyUrl = getOption("rejustify.proxyUrl"),
  proxyPort = getOption("rejustify.proxyPort")
)

Arguments

method

Method of the call (GET or POST).

url

Address of the API.

body

Request body in case of using POST method.

proxyUrl

Url address of the proxy server.

proxyPort

Communication port of the proxy server.

Value

API response or errors


rejustify/r-package documentation built on Nov. 7, 2021, 2:10 p.m.