httpPUT | R Documentation |
These two functions are simple, high-level functions
that implement the HTTP request methods PUT and DELETE.
These can also be done by specifying the method
type using the curl option customrequest
.
These functions merely provide a convenience
wrapper for getURLContent
with the HTTP method specified.
httpPUT(url, content, ..., curl = getCurlHandle())
httpPOST(url, ..., curl = getCurlHandle())
httpDELETE(url, ..., curl = getCurlHandle())
httpGET(url, ..., curl = getCurlHandle())
httpHEAD(url, ..., curl = getCurlHandle())
httpOPTIONS(url, ..., curl = getCurlHandle())
url |
the URL of the server to which the HTTP request is to be made |
content |
the value that is to be used as the content of the
|
... |
additional arguments passed to |
curl |
the curl handle to be used to make the request |
The content returned by the server as a result of the request.
Duncan Temple Lang
getURLContent
## Not run:
# create a database in a CouchDB server
httpPUT("http://127.0.0.1:5984/temp_db")
# Insert an entry into an ElasticSearch dabtabase.
httpPUT("http://localhost:9200/a/b/axyz", '{"abc" : 123}')
# Then delete the database
httpDELETE("http://127.0.0.1:5984/temp_db")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.