upload_file {httr} | R Documentation |
Upload a file with POST()
or PUT()
.
Description
Upload a file with POST()
or PUT()
.
Usage
upload_file(path, type = NULL)
Arguments
path |
path to file |
type |
mime type of path. If not supplied, will be guess by
|
Examples
citation <- upload_file(system.file("CITATION"))
## Not run:
POST("http://httpbin.org/post", body = citation)
POST("http://httpbin.org/post", body = list(y = citation))
## End(Not run)
[Package httr version 1.4.7 Index]