bookmarks/lib/Http/RequestFactory.php

29 lines
764 B
PHP
Raw Normal View History

<?php
2020-09-21 12:25: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.
*/
2019-01-27 16:26:08 +00:00
namespace OCA\Bookmarks\Http;
use GuzzleHttp\Psr7\Request;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\UriInterface;
class RequestFactory implements RequestFactoryInterface {
/**
* * 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 Request
*/
public function createRequest(string $method, $uri): RequestInterface {
return new Request($method, $uri);
}
}