Skip to content

Request: getMethod Example

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

Shieldon\Psr7\Request

Extends Message.

getMethod()

Retrieves the HTTP method of the request.

  • return string

Example:

echo $request->getMethod();
// Outputs: GET
Clone this wiki locally