first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
{
"name": "psr\/http-client",
"description": "Common interface for HTTP clients",
"keywords": [
"psr",
"psr-18",
"http",
"http-client"
],
"homepage": "https:\/\/github.com\/php-fig\/http-client",
"license": "MIT",
"authors": [
{
"name": "PHP-FIG",
"homepage": "https:\/\/www.php-fig.org\/"
}
],
"require": {
"php": "^7.0 || ^8.0",
"psr\/http-message": "^1.0 || ^2.0"
},
"autoload": {
"psr-4": {
"VendorDHL\\Psr\\Http\\Client\\": "src\/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace VendorDHL\Psr\Http\Client;
/**
* Every HTTP client related exception MUST implement this interface.
*/
interface ClientExceptionInterface extends \Throwable
{
}

View File

@@ -0,0 +1,19 @@
<?php
namespace VendorDHL\Psr\Http\Client;
use VendorDHL\Psr\Http\Message\RequestInterface;
use VendorDHL\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(\VendorDHL\Psr\Http\Message\RequestInterface $request) : \VendorDHL\Psr\Http\Message\ResponseInterface;
}

View File

@@ -0,0 +1,23 @@
<?php
namespace VendorDHL\Psr\Http\Client;
use VendorDHL\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 \VendorDHL\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() : \VendorDHL\Psr\Http\Message\RequestInterface;
}

View File

@@ -0,0 +1,23 @@
<?php
namespace VendorDHL\Psr\Http\Client;
use VendorDHL\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 \VendorDHL\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() : \VendorDHL\Psr\Http\Message\RequestInterface;
}