- url
An object of class fhir_url or a character vector of length one containing the url to PUT to.
- body
An object of class fhir_resource or fhir_body. See details for how to generate them.
- username
A character vector of length one containing the username for basic authentication.
- password
A character vector of length one containing the password for basic authentication.
- token
A character vector of length one or object of class httr::Token, for bearer token authentication (e.g. OAuth2). See fhir_authenticate()
for how to create this.
- add_headers
A named character vector of custom headers to add to the HTTP request, e.g. c(myHeader = "somevalue")
or
c(firstHeader = "value1", secondHeader = "value2")
.
- verbose
An integer vector of length one. If 0, nothing is printed, if > 0 success message is printed. Defaults to 1.
- log_errors
Either NULL
or a character vector of length one indicating the name of a file in which to save http errors.
NULL
means no error logging. When a file name is provided, the errors are saved in the specified file. Defaults to NULL
.
Regardless of the value of log_errors
the most recent http error message within the current R session is saved internally and can
be accessed with fhir_recent_http_error()
.