File: req_get_method.Rd

package info (click to toggle)
r-cran-httr2 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,684 kB
  • sloc: sh: 13; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 634 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/req-method.R
\name{req_get_method}
\alias{req_get_method}
\title{Get request method}
\usage{
req_get_method(req)
}
\arguments{
\item{req}{A httr2 \link{request} object.}
}
\description{
Defaults to \code{GET}, unless the request has a body, in which case it uses
\code{POST}. Either way the method can be overridden with \code{\link[=req_method]{req_method()}}.
}
\examples{
req <- request(example_url())
req_get_method(req)
req_get_method(req |> req_body_raw("abc"))
req_get_method(req |> req_method("DELETE"))
req_get_method(req |> req_method("HEAD"))
}