2017 © Pedro Peláez
 

library php-fluent-http-client

PHP Fluent Http Client

image

athena-oss/php-fluent-http-client

PHP Fluent Http Client

  • Tuesday, May 2, 2017
  • by rafaelspinto
  • Repository
  • 4 Watchers
  • 2 Stars
  • 112,082 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 6 Versions
  • 12 % Grown

The README.md

PHP Fluent Http Client

Build Status, (*1)

PHP Fluent Http Client is a library for handling http requests and responses with a fluent api., (*2)

How to install?

You have two options to use it on your project :, (*3)

"require": {
    "athena-oss/php-fluent-http-client": "0.7.0",
 }

Examples

GET method with response assertions on :

  • header value
  • content type
  • status code
$responseJson = (new HttpClient())->get('http://example.com')
            ->withHeader('name', 'value')
            ->withProxy('http://myproxy.com', 3128)
            ->then()
            ->assertThat()
            ->headerValueIsEqual('expected_header', 'expected_value')
            ->responseIsJson()
            ->statusCodeIs(200)
            ->retrieve()
            ->fromJson();

POST method with authorization and assertion on status code :

$responseString = (new HttpClient())->put('http://example.com')
            ->withUserAgent('my_user_agent_string')
            ->withDigestAuth('myusername', 'mypassword')
            ->withProxy('http://myproxy', 1234)
            ->withBody('my content', 'my content type')
            ->then()
            ->assertThat()
            ->statusCodeIs(201)
            ->retrieve()
            ->fromString();

Contributing

Checkout our guidelines on how to contribute in CONTRIBUTING.md., (*4)

Versioning

Releases are managed using github's release feature. We use Semantic Versioning for all the releases. Every change made to the code base will be referred to in the release notes (except for cleanups and refactorings)., (*5)

License

Licensed under the Apache License Version 2.0 (APLv2)., (*6)

The Versions

02/05 2017

dev-master

9999999-dev

PHP Fluent Http Client

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

02/05 2017

v0.9.0

0.9.0.0

PHP Fluent Http Client

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

10/03 2017

v0.8.2

0.8.2.0

PHP Fluent Http Client

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

11/01 2017

v0.7.2

0.7.2.0

PHP Fluent Http Client

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

21/11 2016

v0.7.1

0.7.1.0

PHP Fluent Http Client

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

13/09 2016

v0.7.0

0.7.0.0

PHP Fluent Http Client

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires