Commit realizado el 12:13:52 08-04-2024
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2017 PHP Framework Interoperability Group
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Client;
|
||||
|
||||
/**
|
||||
* Every HTTP client related exception MUST implement this interface.
|
||||
*/
|
||||
interface ClientExceptionInterface extends \Throwable
|
||||
{
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Client;
|
||||
|
||||
use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface;
|
||||
use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface;
|
||||
interface ClientInterface
|
||||
{
|
||||
/**
|
||||
* Sends a PSR-7 request and returns a PSR-7 response.
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*
|
||||
* @throws \Psr\Http\Client\ClientExceptionInterface If an error happens while processing the request.
|
||||
*/
|
||||
public function sendRequest(\WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface $request) : \WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface;
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Client;
|
||||
|
||||
use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface;
|
||||
/**
|
||||
* Thrown when the request cannot be completed because of network issues.
|
||||
*
|
||||
* There is no response object as this exception is thrown when no response has been received.
|
||||
*
|
||||
* Example: the target host name can not be resolved or the connection failed.
|
||||
*/
|
||||
interface NetworkExceptionInterface extends \WPMailSMTP\Vendor\Psr\Http\Client\ClientExceptionInterface
|
||||
{
|
||||
/**
|
||||
* Returns the request.
|
||||
*
|
||||
* The request object MAY be a different object from the one passed to ClientInterface::sendRequest()
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public function getRequest() : \WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface;
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace WPMailSMTP\Vendor\Psr\Http\Client;
|
||||
|
||||
use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface;
|
||||
/**
|
||||
* Exception for when a request failed.
|
||||
*
|
||||
* Examples:
|
||||
* - Request is invalid (e.g. method is missing)
|
||||
* - Runtime request errors (e.g. the body stream is not seekable)
|
||||
*/
|
||||
interface RequestExceptionInterface extends \WPMailSMTP\Vendor\Psr\Http\Client\ClientExceptionInterface
|
||||
{
|
||||
/**
|
||||
* Returns the request.
|
||||
*
|
||||
* The request object MAY be a different object from the one passed to ClientInterface::sendRequest()
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public function getRequest() : \WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface;
|
||||
}
|
Reference in New Issue
Block a user