PHPackages                             gbv/jskos-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. [API Development](/categories/api)
4. /
5. gbv/jskos-http

AbandonedArchivedLibrary[API Development](/categories/api)

gbv/jskos-http
==============

JSKOS API implementation (server and client)

0.3.1(8y ago)0132[2 issues](https://github.com/gbv/jskos-http/issues)3LGPLPHPPHP &gt;=7.0

Since Aug 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/gbv/jskos-http)[ Packagist](https://packagist.org/packages/gbv/jskos-http)[ Docs](http://gbv.github.io/jskos-http/)[ RSS](/packages/gbv-jskos-http/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (13)Versions (7)Used By (3)

jskos-http - JSKOS API implementation
=====================================

[](#jskos-http---jskos-api-implementation)

[![Latest Version](https://camo.githubusercontent.com/c9d1a891bab1ef3a3d5b8f437c5fda26dff45821f004dd19fb6aa7f13c0366ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6762762f6a736b6f732d687474702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gbv/jskos-http)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/6f54770dff7ef9240535884c1d0aeffdcaeafe1a2d5b5420ec2f8b91361d2c46/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6762762f6a736b6f732d687474702e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/gbv/jskos-http)[![Coverage Status](https://camo.githubusercontent.com/5bba234aca03409f39ca5ff795d9ee2f1f9d30a36f2767c87af4e3b28ed67129/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6762762f6a736b6f732d687474702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/gbv/jskos-http)[![Quality Score](https://camo.githubusercontent.com/30493430e5b61c99274ea7f5a2884739e88d792533ba3c44db30dd4ad221960d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6762762f6a736b6f732d687474702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gbv/jskos-http)[![Total Downloads](https://camo.githubusercontent.com/1664d9789f36caf8d988cdc40c210f33f824848d92dabb7b2acafcf68ce516ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6762762f6a736b6f732d687474702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gbv/jskos)

Requirements
============

[](#requirements)

Requires PHP 7.0 or PHP 7.1, package [jskos](https://packagist.org/packages/gbv/jskos), and any package listed as [php-http/client-implementation](https://packagist.org/providers/php-http/client-implementation).

Bugs and feature request are [tracked on GitHub](https://github.com/gbv/jskos-http/issues).

Installation
============

[](#installation)

With composer
-------------

[](#with-composer)

Install a [php-http/client-implementation](https://packagist.org/providers/php-http/client-implementation) and the latest version of this package, e.g.:

```
composer require php-http/curl-client gbv/jskos-http
```

This will automatically create `composer.json` for your project (unless it already exists) and add jskos-http as dependency. Composer also generates `vendor/autoload.php` to get autoloading of all dependencies:

Usage and examples
==================

[](#usage-and-examples)

See directory [examples](examples) for example scripts and [jskos-php-examples](https://github.com/gbv/jskos-php-examples) for an example application.

Client
------

[](#client)

See class `Client` to query JSKOS API and get back `Result` objects.

```
use JSKOS\Client;

$client = new Client('http://example.org/');
$result = $client->query(['uri'=>$uri]);

if (count($result)) {
  ...
}
```

An optional `Http\Client\HttpClient` can be passed as second argument. Use this for instance to log all HTTP requests:

```
$handler = \GuzzleHttp\HandlerStack::create();
foreach(['{method} {uri}', '{code} - {res_body}'] as $format) {
	$handler->unshift(
		\GuzzleHttp\Middleware::log(
			$logger, // e.g. Monolog\Logger
			new \GuzzleHttp\MessageFormatter($format)
		)
	);
}

$httpClient = \Http\Adapter\Guzzle6\Client::createWithConfig([
    'handler' => $handler,
]);

$jskoClient = new Client('http://example.org/', $httpClient);
```

Server
------

[](#server)

Class `Server` wraps a JSKOS `Service` with [PSR-7 HTTP message interfaces](http://www.php-fig.org/psr/psr-7/) so it can be used with your favorite PSR-7 framework. An example with [Slim](https://packagist.org/packages/slim/slim):

```
$server = new JSKOS\Server($service);

$app = new Slim\App();

$app->get('/api', function ($request) use ($server) {
    return $server->query($request);
});

$app->run();
```

But there is no need to use an additional framework to support simple HTTP GET requests:

```
use JSKOS;

$server = new Server($service);
$response = $server->queryService($_GET, $_SERVER['PATH_INFO'] ?? '');
Server::sendResponse($response);

```

Author and License
==================

[](#author-and-license)

Jakob Voß

JSKOS-HTTP is licensed under the LGPL license - see `LICENSE.md` for details.

See also
========

[](#see-also)

JSKOS is created as part of project coli-conc: .

The current specification of JSKOS is available at .

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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 ~15 days

Total

5

Last Release

3177d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2a9725ee91210e1e5eab44e4f734b678a0650a03116aee170be7b49edcbb2e4?d=identicon)[gbv](/maintainers/gbv)

---

Top Contributors

[![nichtich](https://avatars.githubusercontent.com/u/299856?v=4)](https://github.com/nichtich "nichtich (13 commits)")

---

Tags

coli-concjskoslibrarySKOS

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gbv-jskos-http/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k86.9M2.2k](/packages/symfony-symfony)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M715](/packages/sylius-sylius)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69734.4M145](/packages/algolia-algoliasearch-client-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.7k371.6k6](/packages/theodo-group-llphant)

PHPackages © 2026

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