2017 © Pedro Peláez
 

library http

Response and Request class

image

force/http

Response and Request class

  • Tuesday, October 27, 2015
  • by Awilum
  • Repository
  • 1 Watchers
  • 1 Stars
  • 249 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Http Component

version MIT License, (*1)

Simple Http Component to work with Http request, response and urls., (*2)

Installation

composer require flextype-components/http

Usage

Set header status, (*3)

Http::setResponseStatus(404);

Redirects the browser to a page specified by the url argument., (*4)

Http::redirect('http://flextype.org');

Set one or multiple request headers., (*5)

Http::setRequestHeaders('Location: http://flextype.org');

Get, (*6)

$action = Http::get('action');

Post, (*7)

$username = Http::post('username');

Returns whether this is an ajax request or not, (*8)

if (Http::isAjaxRequest()) {
  // do something...
}

Terminate request, (*9)

Http::requestShutdown();

Gets the base URL, (*10)

echo Http::getBaseUrl();

Gets current URL, (*11)

echo Http::getCurrentUrl();

Get Uri String, (*12)

$uri_string = Http::getUriString();

Get Uri Segments, (*13)

$uri_segments = Http::getUriSegments();

Get Uri Segment, (*14)

$uri_segment = Http::getUriSegment(1);

License

See LICENSE, (*15)

The Versions

27/10 2015

dev-master

9999999-dev https://github.com/force-components/Http/issues

Response and Request class

  Sources   Download

MIT

The Requires

 

http request response force

27/10 2015

v1.0.2

1.0.2.0 https://github.com/force-components/Http/issues

Response and Request class

  Sources   Download

MIT

The Requires

 

http request response force