trii/http-headers 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

trii/http-headers

Composer 安装命令:

composer require trii/http-headers

包简介

WTHeaders is a qvalue? Don't worry, we got that for you!

README 文档

README

Build Status

Accept: text/feedback, application/pull-requests

SHOULD be interpreted as "This is a work in progress. Early feedback and pull requests are accepted"

HTTP is hard and you're probably dealing with headers the wrong way. Do you know what Accept-Encoding: identity means? What about a qvalue? How about this nonsense:

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,application/json

We didn't think so but guess what? You don't have to! That is right, http-headers can parse this for you and just let you know if the requestor accepts what you want to give them and even ask which one they prefer.

Check out how easy this is!

use Trii\HTTPHeaders;

$accept = new HTTPHeaders\Accept('audio/*; q=0.2, audio/basic');

var_dump($accept->isAccepted('audio/mpeg'));
// bool(true)

var_dump($accept->getPreferredType());
// string(11) "audio/basic"

Awesome right?!?

统计信息

  • 总下载量: 111
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: HTML

其他信息

  • 授权协议: BSD
  • 更新时间: 2015-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固