SERVICE


云启未来,智造互联
企业上云升级,助力企业腾飞

httplug, guzzle和api的概述

发布时间:2017-5-13 23:16:37您的位置: > 建站百科 > 正文

httplug、狂饮和API的概述
托拜厄斯,你是怎么参与狂饮?
米迦勒啾啾呼吁一个额外的维护。
托拜厄斯接电话。
我áRK的áGI卡兹áR也是该项目的巨星系。
那些已经发布了几个主要发布在一个相当短的时间内,这导致了一些冲突。的狂饮社区将约7版本更加小心。
HTTPlug为那些不做什么?
httplug在HTTP的客户端一个抽象的概念,并提供了一个一致的psr-7兼容的包装多个HTTP客户端。
它增长了象牙HTTP适配器。
使用httplug意味着你的代码依赖于抽象而不是实现一个HTTP HTTP。
我如何迁移到HTTPlug?
这取决于如何将您连接到现有的实现。
你需要3个库/包来实现HTTPlug:
一个HTTP消息(psr-7实施)
创建消息的方法(消息工厂)
发送消息的方式(HTTP客户端)
图书馆使用httplug用户可以选择适合自己的套餐/实现或库维护人员可能指定的默认实现。
httplug是图书馆的作者。应用开发者是消费者httplug。
布瑞恩谈到stormpath PHP SDK的迁移httplug
stormpath SDK使用狂饮3,现在放弃了。
其他依赖/整合缺乏允许stormpath避免升级。
一旦他们开始添加更多的集成,这导致冲突的版本要求的问题。
有关于是否迁移到新版本的暴食或用别的一些争论。
httplug代表了一种更灵活的解决方案。
托拜厄斯和Magnus Nordlander帮助他们迁移。
stormpath提供默认实现httplug包,但用户可以改变他们。
伍迪,为thephpleague / oauth2狂饮坚持与客户的原因是什么?
thephpleague / oauth2客户最近决定迁移到httplug。
暴食是事实上的标准。
狂饮6 psr-7现在兼容。
与广泛采用的psr-7,那里是一个抽象图书馆像HTTPlug需要更少的。psr-7提供抽象。
httplug可以如果你强迫他们选择自己的实现添加用户的复杂性。
这是一个暂时性的问题,有一个抽象的概念,如HTTPlug的长期需要?
建筑httplug是一些可以很快完成。代表行动缓慢。
有几个即将到来的PSR标准(psr-15,psr-17)这应该有助于解决这些问题。
原则上,这些即将到来的代表应该解决的问题,但图书馆采用这些标准的过渡期,我们可能还需要适配器。

HTTPlug, Guzzle & API's Show Summary
Tobias, how did you get involved in Guzzle?
Michael tweeted a call for an additional maintainer.
Tobias answered the call.
Márk Sági-Kazár is also a superstar maintainer on the project.
Guzzle has released several major releases in a fairly short space of time, which has lead to some conflicts. The Guzzle community will be more careful about a version 7 release.
What does HTTPlug offer that Guzzle doesn't?
HTTPlug is an abstraction over HTTP clients and provides a consistent PSR-7 compliant wrapper over multiple HTTP clients.
It grew out of Ivory HTTP Adapter.
Using HTTPlug means your code depends on an HTTP abstraction rather than an HTTP implementation.
How do I migrate to HTTPlug?
It depends on how coupled you are to an existing implementation.
You need 3 libraries/packages to implement HTTPlug:
A HTTP message (PSR-7 implementation)
A way to create the message (message factory)
A way to send the message (HTTP client)
Users of libraries that use HTTPlug may choose their own packages/implementations or library maintainers may specify default implementations.
HTTPlug is for library authors. Application developers are consumers of HTTPlug.
Brian talks about Stormpath PHP SDK's migration to HTTPlug
Stormpath SDK was using Guzzle 3 which is now abandoned.
Lack of other dependencies/integrations allowed Stormpath to avoid upgrading.
Once they started adding more integrations, this lead to problems with conflicting version requirements.
There was some debate over whether to migrate to a newer version of Guzzle or use something else.
HTTPlug represented a more versatile solution.
Tobias and Magnus Nordlander helped them to migrate.
Stormpath provide default implementations for HTTPlug to wrap, but users may change them.
Woody, what are the reasons for thephpleague/oauth2-client sticking with Guzzle?
thephpleague/oauth2-client recently decided against migrating to HTTPlug.
Guzzle is the de-facto standard.
Guzzle 6 is PSR-7 now compliant.
With wider adoption of PSR-7, there is less need for an abstraction library like HTTPlug. PSR-7 provides that abstraction.
HTTPlug can add complexity for your users if you force them to pick their own implementations.
Is this a transient problem, is there a long-term need for an abstraction like HTTPlug?
Building HTTPlug was something that could be done quickly. PSRs move slowly.
There are several upcoming PSR standards (PSR-15, PSR-17) which should help to resolve these issues.
In principle, these upcoming PSRs should solve problems, but during the transitional phase of libraries adopting these standards, we may still need adapters.

梦之网科技
本文网址:http://www.mzwkj.com/baike/876.html

济南梦之网科技:济南网站建设,济南网站设计公司,网站建设开发公司,专业网站制作公司,拥有专业的技术团队,一流的服务团队.专业团队为您提供网站设计,网站定制服务,公众号应用开发,微信小程序开发,为用户提供成套解决方案,智能农业物联网系统

您可能感兴趣