Skip to content

chillerlan/php-httpinterface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chillerlan/php-httpinterface

A http client wrapper for PHP 7.2+.

version license Travis Coverage Scrunitizer Packagist downloads PayPal donate

HTTPClientInterface

method return
request(string $url, array $params = null, string $method = null, $body = null, array $headers = null) HTTPResponseInterface
normalizeRequestHeaders(array $headers) array
buildQuery(array $params, bool $urlencode = null, string $delimiter = null, string $enclosure = null) string
checkQueryParams(array $params, bool $booleans_as_string = null) array

HTTPClientTrait

The HTTPClientTrait provides several (protected) shortcut methods for the HTTPClientInterface.

method return
setHTTPClient(HTTPClientInterface $http) $this
httpRequest(string $url, array $params = null, string $method = null, $body = null, array $headers = null) HTTPResponseInterface
httpDELETE(string $url, array $params = null, array $headers = null) HTTPResponseInterface
httpGET(string $url, array $params = null, array $headers = null) HTTPResponseInterface
httpPATCH(string $url, array $params = null, $body = null, array $headers = null) HTTPResponseInterface
httpPOST(string $url, array $params = null, $body = null, array $headers = null) HTTPResponseInterface
httpPUT(string $url, array $params = null, $body = null, array $headers = null) HTTPResponseInterface
normalizeRequestHeaders(array $headers) array
checkQueryParams($params, bool $booleans_as_string = null) mixed
httpBuildQuery(array $params, bool $urlencode = null, string $delimiter = null, string $enclosure = null) string

Sponsor this project

Languages