2017 © Pedro Peláez
 

library http

Library of Http Clients

image

jimdo/http

Library of Http Clients

  • Friday, May 26, 2017
  • by jimdo-dev
  • Repository
  • 4 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

CircleCI, (*1)

php-http-lib

This repository is a library of http clients - Response, Request and Session., (*2)

Makefile

The library code provides a Makefile:, (*3)

$ make help
bootstrap    Install composer
update       Update composer packages
tests        Execute test suite

Download

$ https://packagist.org/packages/jimdo/http, (*4)

$ composer require jimdo/http, (*5)

Developement setup

# Clone the repository

$ git clone git@github.com:Jimdo/php-http-lib.git

# Install composer and project dependencies

$ make bootstrap

# Requirements for test-driven

$ (xDebug) phpbrew ext install xdebug

Useful methods in the Request Object

  • __construct(queryParams, formData, sessionData) - The construct is the field where the query params and form data need to fill in as an array. The third one is a session object.
  • getQueryParams() - Returns query params as an array if available
  • getFormData() - Returns information from the form as an array
  • getSessionData() - Returns session data as an array

Useful methods in the Response Object

  • addBody() - Attach html code to one string for the correct body format
  • addHeader() - Add one header to the Response Headers
  • render() - Render header and body into correct html output code

Session Object

The Session Object handles with magic properties and methods., (*6)

  • Set properties via __construct or define properties with the session object
(example)
1. $session = new Session(["foo" => "bar"]);
2. $session->foo = "bar";
  • Get properties
(example)
$session = new Session(["foo" => "bar"]);

$data = $session->foo;

The Versions

26/05 2017

dev-master

9999999-dev

Library of Http Clients

  Sources   Download

MIT

The Development Requires

by Hauke Stange
by Jennifer Eschenhorn
by Tom Stich

26/05 2017

v0.1.7

0.1.7.0

Library of Http Clients

  Sources   Download

MIT

The Development Requires

by Hauke Stange
by Jennifer Eschenhorn
by Tom Stich

24/05 2017

v0.1.6

0.1.6.0

Libary of Http Clients

  Sources   Download

MIT

The Development Requires

by Hauke Stange
by Jennifer Eschenhorn
by Tom Stich

24/05 2017

v0.1.5

0.1.5.0

Libary of Http Clients

  Sources   Download

MIT

The Development Requires

by Hauke Stange
by Jennifer Eschenhorn
by Tom Stich

24/05 2017

v0.1.0

0.1.0.0

Libary of Http Clients

  Sources   Download

MIT

The Development Requires

by Hauke Stange
by Jennifer Eschenhorn
by Tom Stich

24/05 2017

v0.0.2

0.0.2.0

Libary of Http Clients

  Sources   Download

MIT

The Development Requires

by Hauke Stange
by Jennifer Eschenhorn
by Tom Stich

24/05 2017

v0.0.1

0.0.1.0

Libary of Http Clients

  Sources   Download

MIT

The Development Requires

by Hauke Stange
by Jennifer Eschenhorn
by Tom Stich