PHPackages                             jpdik/request - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. jpdik/request

ActiveHttp[HTTP &amp; Networking](/categories/http)

jpdik/request
=============

A simple request class

1.1(4y ago)024proprietaryPHPPHP &gt;=5.3.0

Since Jul 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jpdik/request)[ Packagist](https://packagist.org/packages/jpdik/request)[ Docs](https://github.com/jpdik/request)[ RSS](/packages/jpdik-request/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

Request
=======

[](#request)

A simple request class for PHP

Instalation
-----------

[](#instalation)

```
composer require jpdik/request
```

Example use
-----------

[](#example-use)

Create a base\_url:

```
$req = new Request("https://api.openweathermap.org/data/2.5");
```

Specify the rest of request and Type (GET, POST, PUT or DELETE) and get the response:

```
$res = $req->get("/weather", "?q=São joão del rei&appid=d15abc236092bbf9dd28fa2c0a7a02a9");

$status = res->getStatusCode();

if($status == 200 && $res){
  echo json_encode($res);
}
```

Methods
=======

[](#methods)

```
//GET
get($url, $option = null, array $headers = null, $timeout = null)

//POST
post($url, $body, $option = null, array $headers = null, $timeout = null)

//PUT
put($url, $body, $option = null, array $headers = null, $timeout = null)

//DELETE
delete($url, $option = null, array $headers = null, $timeout = null)

//Get the status from request
getStatusCode()
```

Example Headers
---------------

[](#example-headers)

```
$headers = [
  "Content-Type: application/json",
  "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6IjcyYTg0NDdhOTA3MGYyZTVmOGIzZDkzYzViZjE4MWE0In0.99kTzhSVwges69qprisg9B3rty4eKTTBurH-1lGKe30"];
```

if Headers it's not informed, the default is used as JSON:

```
$headers = [
  "Content-Type: application/json",
];
```

Full example
------------

[](#full-example)

```
$req = new Request("https://api.openweathermap.org/data/2.5");

$res = $req->get("/weather", "?q=São joão del rei&appid=d15abc236092bbf9dd28fa2c0a7a02a9");

$status = res->getStatusCode();

if($status == 200 && $res){
  echo json_encode($res);
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1754d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/568ab6eb558d4a883f3cc45bb783f44bdb45fd19f7cd6708de90c5141787d62c?d=identicon)[jpdik](/maintainers/jpdik)

---

Top Contributors

[![uairangodev2](https://avatars.githubusercontent.com/u/58440208?v=4)](https://github.com/uairangodev2 "uairangodev2 (3 commits)")[![jpdik](https://avatars.githubusercontent.com/u/20975080?v=4)](https://github.com/jpdik "jpdik (1 commits)")

---

Tags

httpresponserequesthttp-messageapicurljpdik

### Embed Badge

![Health badge](/badges/jpdik-request/health.svg)

```
[![Health](https://phpackages.com/badges/jpdik-request/health.svg)](https://phpackages.com/packages/jpdik-request)
```

###  Alternatives

[fig/http-message-util

Utility classes and constants for use with PSR-7 (psr/http-message)

39489.0M274](/packages/fig-http-message-util)[aplus/http-client

Aplus Framework HTTP Client Library

2161.6M1](/packages/aplus-http-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
