2017 © Pedro Peláez
 

library http

PHP PSR-7 compatible HTTP client (using cURL)

image

phyrexia/http

PHP PSR-7 compatible HTTP client (using cURL)

  • Tuesday, June 13, 2017
  • by Jejem
  • Repository
  • 2 Watchers
  • 4 Stars
  • 618 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 18 Versions
  • 2 % Grown

The README.md

http-client

PHP PSR-7 compatible HTTP client (using cURL), (*1)

Latest Stable Version License, (*2)

Requirements

Installation

Install directly via Composer:, (*3)

$ composer require phyrexia/http

Basic Usage

<?php
require 'vendor/autoload.php';

use Phyrexia\Http\Client as HttpClient;

//HTTP GET to www.google.fr
$response = HttpClient::get('http://www.google.fr');

//And now with a query string
$response = HttpClient::get('http://www.google.fr', 'a=1&b=c');

//Query string in array format
$response = HttpClient::get('http://www.google.fr', array('a' => 1, 'b' => 'c'));

//An HTTP POST with some data
$response = HttpClient::post('http://www.google.fr', array('user' => 'test', 'submit' => 1));

//You can also build an HttpClient object, and provide cURL options (::get, ::post and ::head support cURL options too)
$client = new HttpClient('http://www.google.fr', 'GET', array(CURLOPT_CONNECTTIMEOUT => 2, CURLOPT_TIMEOUT => 5));
$response = $client->send();

//The response is a Response object, if you just want the body, you can cast it as a string
$body = (string)HttpClient::get('http://www.google.fr');

The Versions

13/06 2017

dev-master

9999999-dev

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

13/06 2017

2.6.1

2.6.1.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

09/01 2017

2.6.0

2.6.0.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

25/10 2016

2.5.1

2.5.1.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

29/08 2016

2.5.0

2.5.0.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

16/02 2016

2.4.1

2.4.1.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

27/01 2016

2.4.0

2.4.0.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

12/01 2016

2.3.1

2.3.1.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

12/01 2016

2.3.0

2.3.0.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

11/01 2016

2.2.0

2.2.0.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

04/11 2015

2.1.1

2.1.1.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

29/10 2015

2.1.0

2.1.0.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

25/10 2015

2.0.0

2.0.0.0

PHP PSR-7 compatible HTTP client (using cURL)

  Sources   Download

MIT

The Requires

 

http request client response

17/10 2015

1.3.0

1.3.0.0

PHP class to perform HTTP requests easily

  Sources   Download

MIT

The Requires

  • php >=5
  • ext-curl *

 

http request

30/09 2015

1.2.0

1.2.0.0

PHP class to perform HTTP requests easily

  Sources   Download

MIT

The Requires

  • php >=5
  • ext-curl *

 

http request

29/09 2015

1.1.1

1.1.1.0

PHP class to perform HTTP requests easily

  Sources   Download

MIT

The Requires

  • php >=5
  • ext-curl *

 

http request

27/09 2015

1.1.0

1.1.0.0

PHP class to perform HTTP requests easily

  Sources   Download

MIT

The Requires

  • php >=5
  • ext-curl *

 

http request

21/09 2015

1.0.0

1.0.0.0

PHP class to perform HTTP requests easily

  Sources   Download

MIT

The Requires

  • php >=5
  • ext-curl *

 

http request