httr (version 0.1.1)

PUT: Send PUT to request server.

Description

Send PUT to request server.

Usage

PUT(url = NULL, config = list(), body = NULL,
    multipart = TRUE, ..., handle = NULL)

Arguments

url
the url of the page to retrieve
config
Additional configuration settings such as http authentication (authenticate), additional headers (add_headers), cookies (
body
Use NULL for an empty body, a length-one character or file. Each component should either be a character value or the object returned by fileUpload (if you want to upload a file)
multipart
Should the form be send as multipart/form-data (TRUE), or application/x-www-form-urlencoded (FALSE). Files can not be uploaded when FALSE.
...
Further parameters, such as query, path, etc, passed on to modify_url. These parameters must be named.
handle
The handle to use with this request. If not supplied, will be retrieved and reused from the handle_pool based on the scheme, hostname and port of the url. By default httr requests to

Examples

Run this code
b <- new_bin()
PUT(b)

POST("http://httpbin.org/put")
PUT("http://httpbin.org/put")

b2 <- "http://httpbin.org/put"
PUT(b2, body = "A simple text string")
PUT(b2, body = list(x = "A simple text string"))
PUT(b2, body = list(y = upload_file(system.file("CITATION"))))

Run the code above in your browser using DataCamp Workspace