fgsl/http

Fgsl Http Requester

Maintainers

Package info

github.com/fgsl/http

Type:component

pkg:composer/fgsl/http

Statistics

Installs: 200

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

1.4.2 2026-01-27 22:53 UTC

This package is auto-updated.

Last update: 2026-02-27 23:12:28 UTC


README

composer require fgsl/http

Run command:

composer install

For getting Composer: https://getcomposer.org/download/

Run unit tests

phpunit --bootstrap tests/bootstrap.php tests/Fgsl/Test/TestSuite.php

How to use

See below a sample of method request.

use Fgsl\Http\Http;

$ctx = Http::getContext('GET', null);
@$response = Http::request("http://www.horalegalbrasil.mct.on.br/SincronismoPublico.html", $ctx);
        
$this->assertStringContainsString('Sincronismo', $response);

The variable $ctx receives a HTTP context, that is a resource with elements of HTTP protocol.

The variable $response receives HTTP response text, according context defined by $ctx.

Sometimes method request may not work. Then you can use method curl.

See ApiTest class for more examples.