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.aecov.cn/baike/876.html

濟南夢之網科技:濟南網站建設,濟南網站設計公司,網站建設開發公司,專業網站制作公司,擁有專業的技術團隊,一流的服務團隊.專業團隊為您提供網站設計,網站定制服務,公眾號應用開發,微信小程序開發,為用戶提供成套解決方案,智能農業物聯網系統

您可能感興趣