定制 asispts/http-accept 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

asispts/http-accept

最新稳定版本:v1.0.0

Composer 安装命令:

composer require asispts/http-accept

包简介

PHP parser for HTTP Accept, Accept-Language, Accept-Encoding, and Content-Type headers.

README 文档

README

http-accept

» PHP parser for HTTP content negotiation headers «

 

Build License PHP Version Stable Version Downloads

 

http-accept is a PHP library for parsing HTTP headers used in content negotiation. It supports the following headers:

  • Accept
  • Accept-Language
  • Accept-Encoding
  • Content-Type

Parser classes are provided for each header, making it straightforward to extract information from incoming requests.

 

Installation

Install via Composer:

composer require asispts/http-accept

 

Usage

Use the corresponding parser class for each header.

Parse Content-Type

$contentType = (new ContentTypeParser())->parse($source);

Parse HTTP Accept

$types = (new AcceptParser())->parse($source);

Parse Accept-Language

$languages = (new AcceptLanguageParser())->parse($source);

Parse Accept-Encoding

$encodings = (new AcceptEncodingParser())->parse($source);

 

Contributing

Contributions are welcome—whether bug reports, feature requests, or pull requests. For major changes, please open an issue first to discuss your ideas.

 

License

Licensed under the Apache-2.0 License. See the LICENSE file for details.

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2023-04-28