2017 © Pedro Peláez
 

library http

Simple Http Component to work with Http request, response and urls.

image

flextype-components/http

Simple Http Component to work with Http request, response and urls.

  • Monday, April 23, 2018
  • by Awilum
  • Repository
  • 1 Watchers
  • 1 Stars
  • 21 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Http Component

versionMIT 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

23/04 2018

dev-master

9999999-dev https://github.com/flextype-components/http

Simple Http Component to work with Http request, response and urls.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

http

23/04 2018

v1.1.1

1.1.1.0 https://github.com/flextype-components/http

Simple Http Component

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

http

07/04 2018

v1.1.0

1.1.0.0 https://github.com/flextype-components/http

Simple Http Component

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

http

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