ryodevz/httpfulwrapper
Composer 安装命令:
composer require ryodevz/httpfulwrapper
包简介
A Wrapper class for httpful library to make it easy to use.
README 文档
README
Features
Get request Post request Put request
Installing Httpfulwrapper
The recommended way to install httpfulwrapper is through Composer.
composer require ryodevz/httpfulwrapper
Get
use Ryodevz\HttpfulWrapper\Http; require_once 'vendor/autoload.php'; // Make a request $request = Http::get('https://ytryo.my.id/api/animeku/search?q=naruto'); // Send $response = $request->send(); // Body var_dump($response->body);
Post
use Ryodevz\HttpfulWrapper\Http; use Ryodevz\HttpfulWrapper\Mime; require_once 'vendor/autoload.php'; $response = Http::post('https://example.com/login', [ 'email' => 'zulzariozairi@gmail.com', 'password' => 'secret' ], Mime::FORM)->send(); var_dump($response->body);
Mimes
| Mime class | Type |
|---|---|
Mime::JSON |
application/json |
Mime::XML |
application/xml |
Mime::XHTML |
application/html+xml |
Mime::FORM |
application/x-www-form-urlencoded |
Mime::UPLOAD |
multipart/form-data |
Mime::PLAIN |
text/plain |
Mime::JS |
text/javascript |
Mime::HTML |
text/html |
Mime::YAML |
application/x-yaml |
Mime::CSV |
text/csv |
统计信息
- 总下载量: 62
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-07