| req_method {httr2} | R Documentation | 
Set HTTP method in request
Description
Use this function to use a custom HTTP method like HEAD,
DELETE, PATCH, UPDATE, or OPTIONS. The default method is
GET for requests without a body, and POST for requests with a body.
Usage
req_method(req, method)
Arguments
| req | A request. | 
| method | Custom HTTP method | 
Value
A modified HTTP request.
Examples
request(example_url()) |> req_method("PATCH")
request(example_url()) |> req_method("PUT")
request(example_url()) |> req_method("HEAD")
[Package httr2 version 1.0.2 Index]