PHPackages                             flextype-components/http - 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. flextype-components/http

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

flextype-components/http
========================

Simple Http Component to work with Http request, response and urls.

v1.1.1(8y ago)28362MITPHPPHP ^7.1.3

Since Oct 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/flextype-components/http)[ Packagist](https://packagist.org/packages/flextype-components/http)[ Docs](https://github.com/flextype-components/http)[ RSS](/packages/flextype-components-http/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Http Component
==============

[](#http-component)

[![version](https://camo.githubusercontent.com/98461fd39a6ad414ce4f6539d637885f04a4138fba65a452d579c06fa284c719/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e312e312d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265 "Version")](https://camo.githubusercontent.com/98461fd39a6ad414ce4f6539d637885f04a4138fba65a452d579c06fa284c719/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e312e312d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)[![MIT License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/flextype-components/http/blob/master/LICENSE)

Simple Http Component to work with Http request, response and urls.

### Installation

[](#installation)

```
composer require flextype-components/http

```

### Usage

[](#usage)

Set header status

```
Http::setResponseStatus(404);
```

Redirects the browser to a page specified by the url argument.

```
Http::redirect('http://flextype.org');
```

Set one or multiple request headers.

```
Http::setRequestHeaders('Location: http://flextype.org');
```

Get

```
$action = Http::get('action');
```

Post

```
$username = Http::post('username');
```

Returns whether this is an ajax request or not

```
if (Http::isAjaxRequest()) {
  // do something...
}
```

Terminate request

```
Http::requestShutdown();
```

Gets the base URL

```
echo Http::getBaseUrl();
```

Gets current URL

```
echo Http::getCurrentUrl();
```

Get Uri String

```
$uri_string = Http::getUriString();
```

Get Uri Segments

```
$uri_segments = Http::getUriSegments();
```

Get Uri Segment

```
$uri_segment = Http::getUriSegment(1);
```

License
-------

[](#license)

See [LICENSE](https://github.com/flextype-components/http/blob/master/LICENSE)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~454 days

Total

3

Last Release

2939d ago

PHP version history (2 changes)v1.0.2PHP &gt;=5.3.0

v1.1.0PHP ^7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/652557f36367ca6ed585663426c237bf39c4e1b6589b28a20937517bf43b0fe4?d=identicon)[Awilum](/maintainers/Awilum)

---

Top Contributors

[![Awilum](https://avatars.githubusercontent.com/u/477114?v=4)](https://github.com/Awilum "Awilum (19 commits)")

---

Tags

http

### Embed Badge

![Health badge](/badges/flextype-components-http/health.svg)

```
[![Health](https://phpackages.com/badges/flextype-components-http/health.svg)](https://phpackages.com/packages/flextype-components-http)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.1k1.0B5.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[php-http/httplug

HTTPlug, the HTTP client abstraction for PHP

2.6k307.6M680](/packages/php-http-httplug)[psr/http-client

Common interface for HTTP clients

1.7k680.7M2.1k](/packages/psr-http-client)[symfony/http-client

Provides powerful methods to fetch HTTP resources synchronously or asynchronously

2.0k314.0M3.4k](/packages/symfony-http-client)

PHPackages © 2026

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