.HttpRequest | R Documentation |
Issue an HTTP request. This function allows multiple threads to issue requests concurrently, so the GC thread can issue DELETE requests while the main thread is in the middle of another request.
.HttpRequest(
db_or_conn,
method,
uri,
content_type = NULL,
headers = list(),
data = NULL,
attachments = NULL
)
db_or_conn |
scidb database connection returned from
|
method |
a string specifying the HTTP method ("GET", "POST", "DELETE") |
uri |
the URI/URL to request |
content_type |
the MIME type of any data sent to the server (for POST) |
headers |
a named list of headers to include in the request |
data |
data to include in the request (for POST) |
attachments |
attachments to include in the request (for POST).
This sets the Content-Type to "multipart/form-data" and each attachment
is included in a separate multipart section.
Each attachment is a named list where |
If the server returns a response with a status code in the
"success" range (200-299), returns the result of the call to
curl::curl_fetch_memory
. If not, stops execution with an
error message.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.