% 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"))
}
