camr_post_form_JSON_to_dtf: Sends a POST Form via httr and Converts JSON Return to a Data...

View source: R/R01-Inputs_and_outputs.R

camr_post_form_JSON_to_dtfR Documentation

Sends a POST Form via httr and Converts JSON Return to a Data Frame

Description

This function uses httr to submit a POST form to the given url and converts the response (expected to be a JSON array) to a data.frame. Returns a list containing the data frame and response from the server.

Usage

camr_post_form_JSON_to_dtf(url, params)

Arguments

url

The URL where the POST request should be submitted.

params

A named list of parameters to submit with the POST request.

Value

A list which contains the following elements:

  • data: A data frame containing all records and all fields.

  • status: The HTTP status code returned from the request. If an error was encountered after the request, returns -1.

Author(s)

William Schmitt


rettopnivek/camrprojects documentation built on March 26, 2024, 9:17 a.m.