chillerlan/php-httpinterface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A http client wrapper for PHP 7+.

versionlicenseTravisCoverageScrunitizerPackagist downloadsPayPal donate

methodreturn
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

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

methodreturn
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
http(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

About

A http client wrapper/PSR-7/PSR-17/PSR-18 implementation for PHP 7.4+.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

    Languages