Download the PHP package phppkg/http-client without Composer
On this page you can find all versions of the php package phppkg/http-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package http-client
HTTP Client
An easy-to-use HTTP client library for PHP. Support CURL, file, fsockopen, stream drivers.
- Simple and easy to use HTTP client
- Support drivers:
curl
swoole
fsockopen
stream
fopen
- Support all HTTP method. eg:
GET,POST,PATCH,PUT,HEAD,DELETE
- Support setting proxy, customizing headers, auth, content-type etc.
- Implement interface PSR 18
安装
使用
创建客户端实例
自动选择驱动类:
直接使用指定的类:
基本使用
解析响应Body:
文件上传下载
public function upload(string $url, string $field, string $filePath, string $mimeType = '')
public function download(string $url, string $saveAs)
public function downloadImage(string $imgUrl, string $saveDir, string $rename = '')
常用方法
getJsonArray/getArrayData(): array
getJsonObject(): stdClass
getDataObject(): DataObject
bindBodyTo(object $obj): void
LICENSE
MIT
All versions of http-client with dependencies
PHP Build Version
Package Version
The package phppkg/http-client contains the following files
Loading the files please wait ....