2017 © Pedro Peláez
 

library really-simple-http-requests

A package for people who want to easily send requests and expect a status code and body back.

image

lucky-loek/really-simple-http-requests

A package for people who want to easily send requests and expect a status code and body back.

  • Monday, July 2, 2018
  • by Lucky-Loek
  • Repository
  • 2 Watchers
  • 2 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Really Simple HTTP Requests

Build Status, (*1)

A framework-agnostic wrapper for really easy HTTP requests in PHP., (*2)

This is a package for people who want to easily send requests and expect a status code and body back. Nothing more, nothing less., (*3)

Installation

$ composer require lucky-loek/really-simple-http-requests

Or add to your composer.json file:, (*4)

"require": {
    "lucky-loek/really-simple-http-requests": "^1.0"
}

Usage

$request = new Request(
    'www.httpbin.org/post',
    'post',
    'This is a nice body!',
    [
        'X-Csrf-Token' => 'notSoSafeToken'
    ]
);

$response = $request->send();

echo $response->getBody();
echo $response->getStatusCode();

// You can secretly take a look at the headers too!
echo $response->getHeader('Content-Length');

// Get them all!
foreach $response->getAllHeaders() as $header {
    echo $header;
}

The Versions

02/07 2018

dev-master

9999999-dev

A package for people who want to easily send requests and expect a status code and body back.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Loek van der Linde

15/05 2018

v1.0.0

1.0.0.0

A package for people who want to easily send requests and expect a status code and body back.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Loek van der Linde