Skip to content

Request: getRequestTarget Example

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

Shieldon\Psr7\Request

Extends Message.

getRequestTarget()

Retrieves the message's request target.

  • return string

In most cases, this will be the origin-form of the composed URI, unless it is changed by withRequestTarget method.

Example:

echo $request->getRequestTarget();
// Outputs: /