2017 © Pedro Peláez
 

library ohhttp

OhHttp is a HTTP Request and Response library for PHP

image

rogerthomas84/ohhttp

OhHttp is a HTTP Request and Response library for PHP

  • Monday, August 17, 2015
  • by rogerthomas84
  • Repository
  • 0 Watchers
  • 1 Stars
  • 10,105 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

OhHttp

OhHttp is a HTTP Request and Response library for PHP, (*1)

Latest Stable Version Total Downloads Latest Unstable Version License Build Status, (*2)

Using Composer

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

{
    "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., (*4)

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();

The Versions

17/08 2015

dev-master

9999999-dev https://github.com/rogerthomas84/ohhttp

OhHttp is a HTTP Request and Response library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.7

 

http request http response php http ohhttp

17/08 2015

1.0.1

1.0.1.0 https://github.com/rogerthomas84/ohhttp

OhHttp is a HTTP Request and Response library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.7

 

http request http response php http ohhttp

22/12 2014

1.0.0

1.0.0.0 https://github.com/rogerthomas84/ohhttp

OhHttp is a HTTP Request and Response library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.7

 

http request http response php http ohhttp