PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Mateo   PHP HTTP Request Library   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP HTTP Request Library
Compose and send HTTP requests to given URLs
Author: By
Last change:
Date: 10 months ago
Size: 722 bytes
 

Contents

Class file image Download

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();