Http requests made simple

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

pkg:composer/sparq-php/http

1.1.0 2018-07-06 19:53 UTC

This package is auto-updated.

Last update: 2025-10-07 23:23:21 UTC


README

pipeline status Latest Stable Version coverage report Total Downloads License

A simple to use http request microframework.

Installation and Autoloading

The recommended method of installing is via Composer.

Run the following command from your project root:

$ composer require sparq-php/http

Objectives

  • Simple to use http requests
  • Easy integration with other packages/frameworks
  • Fast and low footprint

Usage

require_once __DIR__ . "/vendor/autoload.php";

use Sparq\Http\RequestBuilder;

$base_url = 'https://targetdomain.com';
$headers = [
	'Content-Type' => 'application/json'
];
$options = []; // Adapter Options

$RequestBuilder = new RequestBuilder($base_url, $headers, $options);
$Result = $RequestBuilder->run('/resourse', 'GET');

$body = $Result->request->body;