2018-09-01 21:12:31 +00:00
|
|
|
<?php
|
2020-09-21 12:25:50 +00:00
|
|
|
/*
|
2024-02-02 18:27:50 +00:00
|
|
|
* Copyright (c) 2020-2024. The Nextcloud Bookmarks contributors.
|
2020-09-21 12:25:50 +00:00
|
|
|
*
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
|
|
|
|
*/
|
2018-09-01 21:12:31 +00:00
|
|
|
|
2019-01-27 16:26:08 +00:00
|
|
|
namespace OCA\Bookmarks\Http;
|
2018-09-01 21:12:31 +00:00
|
|
|
|
2019-12-28 16:41:31 +00:00
|
|
|
use GuzzleHttp\Psr7\Request;
|
2018-09-01 21:12:31 +00:00
|
|
|
use Psr\Http\Message\RequestFactoryInterface;
|
|
|
|
use Psr\Http\Message\RequestInterface;
|
|
|
|
use Psr\Http\Message\UriInterface;
|
|
|
|
|
|
|
|
class RequestFactory implements RequestFactoryInterface {
|
|
|
|
/**
|
2021-01-20 14:42:41 +00:00
|
|
|
* * Create a new request.
|
|
|
|
* *
|
2018-09-01 21:12:31 +00:00
|
|
|
*
|
|
|
|
* @param string $method The HTTP method associated with the request.
|
|
|
|
* @param UriInterface|string $uri The URI associated with the request.
|
2021-01-20 14:42:41 +00:00
|
|
|
*
|
|
|
|
* @return Request
|
2018-09-01 21:12:31 +00:00
|
|
|
*/
|
2019-12-28 16:41:31 +00:00
|
|
|
public function createRequest(string $method, $uri): RequestInterface {
|
|
|
|
return new Request($method, $uri);
|
2018-09-01 21:12:31 +00:00
|
|
|
}
|
|
|
|
}
|