定制 openprovider/http 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

openprovider/http

最新稳定版本:1.0.11

Composer 安装命令:

composer require openprovider/http

包简介

Openprovider Http Service

README 文档

README

Build Status

A simple HTTP PHP library based on Curl, which helps to create HTTP request and get convenient response.

Current version

1.0.11

Examples

use \Openprovider\Service\Http\Request;
use \Openprovider\Service\Http\Response;

$response = Request::get('google.com')->execute();
$status = $response->getHttpStatusCode();
if ($response->isSuccess) {
    $cookie = $response->getCookie();
    $header = $response->getHeader();
    $data = $response->getData();
} else {
    print_r($response->getErrorCode() . ': ' . $response->getErrorDescription());
}
use \Openprovider\Service\Http\Request;
use \Openprovider\Service\Http\Response;

$request = new Request('website.com');
$response = $request->setFollowLocation(false)
    ->setMethod(Request::POST)
    ->setTimeout(10)
    ->setCookie('PREF=ID; Name=Noname')
    ->execute();

Authors

Igor Dolzhikov

Contributors

All the contributors are welcome. If you would like to be the contributor please accept some rules.

  • The pull requests will be accepted only in "develop" branch
  • All modifications or additions should be tested

Thank you for your understanding!

License

MIT Public License

统计信息

  • 总下载量: 7.62k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 20
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-12-29