2017 © Pedro Peláez
 

library http-request

PHP functional HTTPRequest library.

image

hvolschenk/http-request

PHP functional HTTPRequest library.

  • Sunday, June 11, 2017
  • by hvolschenk
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Hvolschenk\HTTPRequest

A simple functional PHP library to work with the current http request, (*1)

Installation:

php composer.phar require hvolschenk\http-request

Functions:

GET()

Returns the list of query string parameters. Returns an empty array if none are available., (*2)

GET(void): array;

GETKey()

Returns the value of a single key in the list of query string parameters. Returns an empty string if the key is not available., (*3)

GETKey(string $key): string;

headers()

Returns the list of HTTP request headers. Returns an empty array if none are available., (*4)

headers(void): array;

headersKey()

Returns the value of a single key in the list of HTTP request headers. Returns an empty string if the key is not available., (*5)

headersKey(string $key): string;

POST()

Returns the POST body. Returns an empty array if it is not available., (*6)

POST(void): array;

POSTKey()

Returns the value of a single key in the POST body. Returns an empty string if the key is not available., (*7)

POSTKey(string $key): string;

Usage example:

<?php
  namespace Sample\Name\Space;
  use function Hvolschenk\HTTPRequest\{ GETKey, headersKey, POST };

  // ...

  if (GETKey('canUpdate') === '1' && doUserAuthCheck(headersKey('Authorization'))) {
    doUserUpdate(POST());
  }

The Versions

11/06 2017

dev-master

9999999-dev https://github.com/hvolschenk/http-request

PHP functional HTTPRequest library.

  Sources   Download

MIT

The Requires

 

php http headers post get

11/06 2017

v0.2

0.2.0.0 https://github.com/hvolschenk/http-request

PHP functional HTTPRequest library.

  Sources   Download

MIT

The Requires

 

php http headers post get

08/06 2017

v0.1

0.1.0.0 https://github.com/hvolschenk/http-request

PHP functional HTTPRequest library.

  Sources   Download

MIT

The Requires

 

php http headers post get