Skip to content

RequestFactory: createRequest Example

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


createRequest($method, $uri)

Create a new request.

  • param string method * The HTTP method associated with the request.
  • param UriInterface|string uri * The URI associated with the request.
  • return RequestInterface


use Shieldon\Psr17\RequestFactory;

$requestFactory = new RequestFactory();
$request = $requestFactory->createRequest('GET', '');