2017 © Pedro Peláez
 

library oxide

Simple and lightweight cURL-based HTTP client for PHP 7.1

image

folour/oxide

Simple and lightweight cURL-based HTTP client for PHP 7.1

  • Friday, July 14, 2017
  • by Folour
  • Repository
  • 1 Watchers
  • 1 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 7 % Grown

The README.md

Oxide

Scrutinizer Code Quality downloads license, (*1)

Simple and lightweight cURL-based HTTP client for PHP 7.1, (*2)

Requirements

Oxide requires PHP 7.1 and php-curl extension, (*3)

Installation

    composer require folour/oxide

Basic usage

    <?php declare(strict_types=1);

    use Folour\Oxide\Oxide;

    $oxide = new Oxide();
    $response = $oxide->get('https://google.com', ['q' => 'php 7.1']);

    //get response body
    echo $response->body(); //Or echo $response;
    //get response code
    echo $response->code();
    //get response headers
    var_dump($response->headers());

Configure

    <?php declare(strict_types=1);

    use Folour\Oxide\Oxide;

    $oxide = new Oxide();
    $oxide
        ->setHeaders([
            'Referer' => 'http://local.dev'
        ])
        ->setCookies([
            'cookie' => 'value'
        ])
        ->setProxy('user:pwd@127.0.0.1:8080');

    $response = $oxide->post('http://httpbin.org/post', ['test']);

More HTTP request methods

    <?php declare(strict_types=1);

    use Folour\Oxide\Oxide;

    $oxide = new Oxide();

    echo $oxide->get('http://httpbin.org/get', ['key' => 'value']);
    echo $oxide->head('http://httpbin.org/get', ['key' => 'value']);
    echo $oxide->post('http://httpbin.org/post', ['key' => 'value']);
    echo $oxide->put('http://httpbin.org/put', ['key' => 'value']);
    echo $oxide->delete('http://httpbin.org/delete', ['key' => 'value']);

The Versions

14/07 2017

1.0.x-dev

1.0.9999999.9999999-dev

Simple and lightweight cURL-based HTTP client for PHP 7.1

  Sources   Download

GPLv3

The Requires

  • php >=7.1
  • ext-curl *

 

by Vadim Bova

curl http http client curl wrapper curl client

14/07 2017

dev-master

9999999-dev

Simple and lightweight cURL-based HTTP client for PHP 7.1

  Sources   Download

GPLv3

The Requires

  • php >=7.1
  • ext-curl *

 

by Vadim Bova

curl http http client curl wrapper curl client

16/06 2017

v1.0.1

1.0.1.0

Simple and lightweight cURL-based HTTP client for PHP 7.1

  Sources   Download

GPLv3

The Requires

  • php >=7.1
  • ext-curl *

 

by Vadim Bova

curl http http client curl wrapper curl client

03/06 2017

v1.0.0-beta

1.0.0.0-beta

Simple and lightweight cURL-based HTTP client for PHP 7.1

  Sources   Download

GPLv3

The Requires

  • php >=7.1
  • ext-curl *

 

by Vadim Bova

curl http http client curl wrapper curl client