make_post_request | R Documentation |
Construct a sched::Request object with a valid header for a POST request.
make_post_request(url, body, mime, soap_action = NULL, encoding = NULL)
url |
A |
body |
The body of the POST request. |
mime |
The MIME type of the body. Example: "text/xml", "application/json". |
soap_action |
In case of a SOAP request, the SOAP action to contact, as a character string. |
encoding |
The encoding to use. A valid integer or string as required by RCurl. |
A sched::Request object.
# Prepare the URL and the request body
the_url <- sched::URL$new('https://httpbin.org/anything')
the_body <- '{"some_key": "my_value"}'
# Make the request object
my_request <- sched::make_post_request(the_url, body = the_body,
mime = "application/json")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.