-
-
Notifications
You must be signed in to change notification settings - Fork 9
Home
The Fetch API provides an interface for fetching resources, typically across the network. It's a web standard, defined at https://fetch.spec.whatwg.org/#fetch-method.
The Fetch API is standardised in all modern web browsers in JavaScript and is well known to web developers around the world.
This project brings the fetch API to the server in PHP, so you can use the same syntax and promise-based workflow that you are used to in JavaScript to perform blocking or non-blocking HTTP requests within your PHP applications.
There are already so many HTTP libraries in the PHP ecosystem. If you want to use the most popular, use Guzzle. If you want the simplest (and built-in to PHP), use cURL. Nearly every PHP developer will be familiar with these two APIs. So why do we need another?
PHP.Gt's mission is to bring well-known web standards to server-side PHP development.
PHP.Gt/Fetch is a separately maintained component of PHP.Gt/WebEngine.