10 個最好的 PHP 庫用于輕松發送HTTP請求

jopen 9年前發布 | 28K 次閱讀 PHP

1. PHP VCR

With PHP VCR, you can record your test suite’s HTTP communications and replay them all through forthcoming test runs for quick, comparative and precise tests. It automatically records and replays HTTP(s) collaborations with nominal setup and make no revisions to your essential production code. Recorded requests and responses can effortlessly be examined and corrected.

10 個最好的 PHP 庫用于輕松發送HTTP請求

2. Guzzle

Guzzle takes the pain out of sending HTTP requests and the redundancy out of creating web service clients. It is a framework that comprises tools required for developing a strong web service client, containing: Resource iterators for traversing paginated resources, Service reports for outlining the inputs & outputs of an API, batching for transporting a big amount of requests as proficiently as possible.

10 個最好的 PHP 庫用于輕松發送HTTP請求

3. Buzz react

Simple async HTTP client for synchronously cooperating with numerous HTTP servers, downloading files, fetching URLs, following redirects, talking to RESTful APIs etc. all at the same time.

10 個最好的 PHP 庫用于輕松發送HTTP請求

4. Httpful

Httpful is a meek and legible PHP library envisioned to make speaking HTTP well-balanced. It allows the developer to concentrate on intermingling with APIs instead of selecting through curl set_opt pages and is a perfect PHP REST client which comes with some useful features like request templates, basic auth, custom headers, client side certificate auth, automatic payload serialization & more.

10 個最好的 PHP 庫用于輕松發送HTTP請求

5. Requests

Requests is a steady PHP library that make use of fsockopen or cURL (depending on the accessibility) and offers a reliable API. It lets you send HEAD, DELETE, UPDATE, POST GET, PUT, and PATCH HTTP requests. Multipart files, parameters, form data and Headers with simple arrays can be added easily, and access the response data in an identical manner.

10 個最好的 PHP 庫用于輕松發送HTTP請求

6. Simple Http Client

This is a fairly handy PHP library which is used to make simple HTTP requests from PHP and is accessible as open source software under the MIT License.

10 個最好的 PHP 庫用于輕松發送HTTP請求

7. httpClient

PHP Http Client is HTTP client that has been created purely in PHP only (100% PHP) and does not make use of cURL or any other external libraries.

10 個最好的 PHP 庫用于輕松發送HTTP請求

8. Goutte

Goutte is a web crawling library for PHP which can also be used for screen scraping. It comes with a nice API to crawl & fetch data from HTML responses

10 個最好的 PHP 庫用于輕松發送HTTP請求

9. Unirest

Unirest is a package of frivolous HTTP libraries for numerous languages (Java, Python, PHP, Ruby and Objective-C) and supports DELETE, UPDATE, POST GET, PUT operations. Methods and response structure of Unirest is similar in all languages.

10 個最好的 PHP 庫用于輕松發送HTTP請求

10. Buzz

Buzz is a lightweight HTTP client that can be used to save and restore data, which is well-suited for the novices to learn more about the working of HTTP clients in a simple way

10 個最好的 PHP 庫用于輕松發送HTTP請求

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!