wlib/http-client

Simple PHP HTTP client class.

v1.0.0 2023-10-20 21:58 UTC

This package is auto-updated.

Last update: 2024-05-20 23:19:33 UTC


README

Classe PHP pour effectuer des requêtes HTTP.

Installation

composer require wlib/http-client

Nécessite l'extension cURL.

Classes disponibles

\wlib\Http\Client\Http

Classe purement statique pour effectuer des requêtes HTTP.

Methodes disponibles

public static function get(string $sUrl, array|string $mData = [], array $aMore = []): array;
public static function post(string $sUrl, array|string $mData = [], array $aMore = []): array;
public static function put(string $sUrl, array|string $mData = [], array $aMore = []): array;
public static function patch(string $sUrl, array|string $mData = [], array $aMore = []): array;
public static function delete(string $sUrl, array|string $mData = [], array $aMore = []): array;
public static function head(string $sUrl, array|string $mData = [], array $aMore = []): array;
public static function options(string $sUrl, array|string $mData = [], array $aMore = []): array;
public static function download(string $sUrl, mixed $mFile, array|string $mData = [], array $aMore = []): array;
public static function request(string $sUrl, string $sMethod = 'get', array|string $mData = [], array $aMore = []): array;
public static function multipartBuildQuery(array $aFields, string $sBoundary = ''): array;