承接 rogerthomas84/ohhttp 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

rogerthomas84/ohhttp

最新稳定版本:1.0.1

Composer 安装命令:

composer require rogerthomas84/ohhttp

包简介

OhHttp is a HTTP Request and Response library for PHP

README 文档

README

OhHttp is a HTTP Request and Response library for PHP

Latest Stable Version Total Downloads Latest Unstable Version License Build Status

Using Composer

To use OhHttp with Composer, add the dependency (and version constraint) to your require block inside your composer.json file.

{
    "require": {
        "rogerthomas84/ohhttp": "1.0.*"
    }
}

Quick Start

You can use the \OhHttp\Request and \OhHttp\Response to provide a simplified HTTP Request and Response, but moving towards a more OO approach.

Request

$request = new \OhHttp\Request();
if ($request->isGet()) {
    $userId = $request->getParam('id', null);
    // do something
} elseif ($request->isPost()) {
    $userId = $request->getParam('id', null);
    // do something
}

Response

$response = new \OhHttp\Response();
$response->setHeader('Content-Type', 'application/json');
$response->setBody('{"foo":"bar"}');
$response->send();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-22