2017 © Pedro Peláez
 

library uuid

Middleware to generate an UUID and save it in the X-Uuid header

image

middlewares/uuid

Middleware to generate an UUID and save it in the X-Uuid header

  • Saturday, January 27, 2018
  • by oscarotero
  • Repository
  • 3 Watchers
  • 1 Stars
  • 1,506 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 8 Versions
  • 19 % Grown

The README.md

middlewares/uuid

Latest Version on Packagist ![Software License][ico-license] Testing ![Total Downloads][ico-downloads], (*1)

Middleware to generate an UUID (Universally Unique Identifiers) and save it in the X-Uuid header of the request and response. Useful for debugging purposes., (*2)

The UUID generated is compatible with RFC 4122 version 4 using ramsey/uuid for that., (*3)

Requirements

Installation

This package is installable and autoloadable via Composer as middlewares/uuid., (*4)

composer require middlewares/uuid

Usage

Dispatcher::run([
    new Middlewares\Uuid(),

    function ($request) {
        //Get the UUID from the request
        echo $request->getHeaderLine('X-Uuid');
    }
]);

//Get the UUID from the response
echo $response->getHeaderLine('X-Uuid');

This option allows to configure the header name. By default is X-Uuid., (*5)

$uuid = (new Middlewares\Uuid())->header('X-Request-Id');

Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details., (*6)

The MIT License (MIT). Please see LICENSE for more information., (*7)

The Versions

27/01 2018

dev-master

9999999-dev https://github.com/middlewares/uuid

Middleware to generate an UUID and save it in the X-Uuid header

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 uuid http psr-15

27/01 2018

v1.0.0

1.0.0.0 https://github.com/middlewares/uuid

Middleware to generate an UUID and save it in the X-Uuid header

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 uuid http psr-15

13/11 2017
21/09 2017

v0.5.0

0.5.0.0 https://github.com/middlewares/uuid

Middleware to generate an UUID and save it in the X-Uuid header

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 uuid http psr-15

18/04 2017

v0.4.0

0.4.0.0 https://github.com/middlewares/uuid

Middleware to generate an UUID and save it in the X-Uuid header

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 uuid http psr-15

26/12 2016

v0.3.0

0.3.0.0 https://github.com/middlewares/uuid

Middleware to generate an UUID and save it in the X-Uuid header

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 uuid http psr-15

27/11 2016

v0.2.0

0.2.0.0 https://github.com/middlewares/uuid

Middleware to generate an UUID and save it in the X-Uuid header

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 uuid http psr-15

05/10 2016

v0.1.0

0.1.0.0 https://github.com/middlewares/uuid

Middleware to generate an UUID and save it in the X-Uuid header

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 uuid http psr-15