承接 middlewares/uuid 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

middlewares/uuid

最新稳定版本:v2.1.0

Composer 安装命令:

composer require middlewares/uuid

包简介

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

README 文档

README

Latest Version on Packagist Software License Testing Total Downloads

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.

The UUID generated is compatible with RFC 4122 version 4 using ramsey/uuid for that.

Requirements

Installation

This package is installable and autoloadable via Composer as middlewares/uuid.

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');

header

This option allows to configure the header name. By default is X-Uuid.

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

Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.

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

统计信息

  • 总下载量: 19.81k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-05