EVOLUTION-MANAGER
Edit File: httpPUT.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Simple high-level functions for HTTP PUT and DELETE</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for httpPUT {RCurl}"><tr><td>httpPUT {RCurl}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Simple high-level functions for HTTP PUT and DELETE</h2> <h3>Description</h3> <p>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 <code>customrequest</code>. These functions merely provide a convenience wrapper for <code><a href="getURL.html">getURLContent</a></code> with the HTTP method specified. </p> <h3>Usage</h3> <pre> 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()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>url</code></td> <td> <p>the URL of the server to which the HTTP request is to be made</p> </td></tr> <tr valign="top"><td><code>content</code></td> <td> <p>the value that is to be used as the content of the <code>PUT</code> request. This can be a character or a <code>raw</code> object.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional arguments passed to <code><a href="getURL.html">getURLContent</a></code></p> </td></tr> <tr valign="top"><td><code>curl</code></td> <td> <p>the curl handle to be used to make the request</p> </td></tr> </table> <h3>Value</h3> <p>The content returned by the server as a result of the request. </p> <h3>Author(s)</h3> <p>Duncan Temple Lang </p> <h3>See Also</h3> <p><code><a href="getURL.html">getURLContent</a></code> </p> <h3>Examples</h3> <pre> ## 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) </pre> <hr /><div style="text-align: center;">[Package <em>RCurl</em> version 1.98-1.2 <a href="00Index.html">Index</a>]</div> </body></html>