2017 © Pedro Peláez
 

library http-request

CURL wrapper for Laravel

image

overburn/http-request

CURL wrapper for Laravel

  • Wednesday, December 20, 2017
  • by overburn
  • Repository
  • 1 Watchers
  • 2 Stars
  • 360 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 5 Versions
  • 6 % Grown

The README.md

overburn/laravel-http-request

Build Status Latest Stable Version Total Downloads License, (*1)

Installation

Update your composer.json file to include this package as a dependency, (*2)

"overburn/http-request": "~1.0"

Register the HttpRequest service provider by adding it to the providers array in the config/app.php file., (*3)

Overburn\HttpRequest\HttpRequestServiceProvider::class

Alias the HttpRequest facade by adding it to the aliases array in the config/app.php file., (*4)

'aliases' => [
     'HttpRequest' => Overburn\HttpRequest\Facades\HttpRequest::class
]

Usage

HttpRequest::request

Sends a request , and returns an array of the following form:, (*5)

[
    "response" => "response body given by the server",
    "info" => "the results of curl_getinfo() on the current request"
]

Example:, (*6)

$options = [
    "method" => "get",
    "url" => "http://www.example.com"
];

HttpRequest::request($options);

The options is an array, (*7)

$options = [
    "method" => "get", //required - get, post, put, patch, delete
    "url" => "http://www.example.com", //required
    "params" => ["parameter"=>"value", "another" => "newvalue"], // url parameters for the request (optional)
    "data" => ["postdata[]"=>"avalue", "postdata[]"=>"anothervalue"], // data for post/put/patch/delete requests (optional, not available on "get")
    "files" => ["file" => "./example.pdf"], //an array of files (optional, not available on "get")
]

The Versions

20/12 2017

dev-master

9999999-dev https://github.com/overburn/laravel-http-request

CURL wrapper for Laravel

  Sources   Download

MIT

The Development Requires

by Teodor Matis

laravel request laravel5 http-request

05/05 2016

1.0.0

1.0.0.0

CURL wrapper for Laravel

  Sources   Download

MIT

The Development Requires

by Teodor Matis

05/05 2016

0.2.1

0.2.1.0

CURL wrapper for Laravel

  Sources   Download

MIT

The Development Requires

by Teodor Matis

05/05 2016

0.2.0

0.2.0.0

CURL wrapper for Laravel

  Sources   Download

MIT

The Development Requires

by Teodor Matis

05/05 2016

0.1.0

0.1.0.0

CURL wrapper for Laravel

  Sources   Download

MIT

The Development Requires

by Teodor Matis