PHP Classes

PHP HTTP Request Library: Compose and send HTTP requests to given URLs

Recommend this page to a friend!

  Author Author  
Picture of Mateo
Name: Mateo <contact>
Classes: 9 packages by
Country: Peru Peru
Innovation award
Innovation award
Nominee: 4x


  Detailed description   Download Download .zip .tar.gz  
This package can compose and send HTTP requests to given URLs.

It provides static functions to define the parameters of an HTTP request that the package will send to a specific URL.

The package can take parameters for defining the HTTP request method, request headers, body data, etc.

It can execute the HTTP request and return the response as an array with the response details or save the response as a downloaded file.

Details

Easy curl

Installation

Github:

git clone https://github.com/Mateodioev/request
cd request
composer install

Composer:

composer require mateodioev/request

Usage

require 'path/to/vendor/autoload.php';

use Mateodioev\Request\Request;

# GET
$res = Request::Get('https://httpbin.org/get');
# POST
$res = Request::Post('https://httpbin.org/post');

# Format
$method = 'GET'; // GET, POST, PUT, DELETE, etc.
$res = Request::$method($url, $headers_array, $postfield_data);

# Methods
Request::Init();
Request::AddOpts();
Request::AddOpt();
Request::addHeaders();
Request::addBody();
Request::setMethod();
Request::Close();
Request::Run();
Request::Create();
Request::Download();

  Classes of Mateo  >  PHP HTTP Request Library  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP HTTP Request Library
Base name: http-request-library
Description: Compose and send HTTP requests to given URLs
Version: -
PHP version: 5
License: MIT/X Consortium License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image HTTP HTTP protocol clients, headers and cookies View top rated classes
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder imagesrc (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file Request.php Class Class source
  Plain text file Utils.php Class Class source

Download Download all files: http-request-library.tar.gz http-request-library.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
For more information send a message to info at phpclasses dot org.