Skip to content

Request: getMethod Example

Terry L edited this page Jun 20, 2020 · 4 revisions
Clone this wiki locally

Shieldon\Psr7\Request

Extends Message.

getMethod()

Retrieves the HTTP method of the request.

  • return string

Example:

echo $request->getMethod();
// Outputs: GET