New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

s00d/guzzle-http-request

GHR is a simple Guzzle wrapper + multiple request + DomCrawler
251

Larablocks Analysis

s00d/guzzle-http-request works with any PHP project: the latest release (1.0.56, Feb 24, 2021) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • No release in the last 12 months (last: Feb 24, 2021)
  • 0 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Feb 24, 2021.
  • No releases in the last 12 months.
  • First released: Jun 5, 2017.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require s00d/guzzle-http-request
Latest Version:1.0.56
PHP:>=5.5.9
License:MIT
Last Updated:Feb 24, 2021
Links: GitHub  ·  Packagist
Maintainer: s00d

GHR

packagist

GHR is a simple Guzzle wrapper + multiple request + DomCrawler

Real documentation is in the works, but for now read the tests.

Installation

Require this package in your composer.json or install it by running:

composer require s00d/guzzle-http-request

To start using Laravel, add the Service Provider and the Facade to your config/app.php:

'providers' => [
	// ...
	 s00d\GuzzleHttpRequest\GHRServiceProvider::class,
]
'aliases' => [
	// ...
	'GHR' => s00d\GuzzleHttpRequest\Facades\GHRFacade::class,
]

Publish the configurations

Run this on the command line from the root of your project:

php artisan vendor:publish

A configuration file will be publish to config/ghr.php

Basic Usage

use GHR;
...

Config::set('ghr.cookie_file', "/cookie/text.txt");
$request = GHR::createRequest()->setProxy('tcp://127.0.0.1:8080')->setRedirects(5)->setHttpErrors(false)->setTimeout(500);
$request->addHeader('user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36');
$response = $request->setUrl('https://localhost')->setType('POST')->send();

$crawler = $response->getCrawler();
try{
    $crawler->filter('.exit')->html();
    print_r(Carbon::now()->toTimeString().": Client auth\n");
} catch(\Exception $e) {
    print_r(Carbon::now()->toTimeString().": Client NOT auth\n");
}

$form = $crawler->selectButton('next')->form();

$form->setValues([
    'user' => $user,
]);

$response->sendForm($form);

var_dump($response->getContents());
var_dump($response->getJson());
...

$response = GHR::createRequest()
    ->setMultipleFlowCount(10) 
    ->setProxy('tcp://127.0.0.1:8080')
    ->removeDataParams()->addToQueue('/guzzle-test/get', 'GET', 0)
    ->setBody(['foo' => 'bar'], 'form_params')->addToQueue('/guzzle-test/post',    'POST',   1)
    ->setBody(['foo' => 'bar'], 'form_params')->addToQueue('/guzzle-test/put',     'PUT',    2)
    ->setBody(['foo' => 'bar'], 'form_params')->addToQueue('/guzzle-test/patch',   'PATCH',  3)
    ->setBody(['foo' => 'bar'], 'form_params')->addToQueue('/guzzle-test/delete'), 'DELETE', 4)
    ->multipleSend('form_params')->getMultiResp();

var_dump($response->responses()); // all responses
var_dump($response->errors());
var_dump($response->finished());

Alternatives to s00d/guzzle-http-request

rexlabs/hyper-http

HTTP client for PHP

172,614 4
hannesvdvreken/guzzle-debugbar

A Guzzle middleware that logs requests to debugbar's timeline

453,141 76
cline/relay

A modern, attribute-driven HTTP client for PHP

13,517 0
sarahman/laravel-http-request-api-log

This library stores the http request api log into a database table.

16,554 1
echoproxy/sdk-laravel

Laravel SDK for EchoProxy — captures HTTP traffic and ships it to ingest-api. Se...

1,402 0

Version History

Version Released PHP License
1.0.56 >=5.5.9 MIT
1.0.55 >=5.5.9 MIT
1.0.54 >=5.5.9 MIT
1.0.53 >=5.5.9 MIT
1.0.52 >=5.5.9 MIT