qmetrics.net

Requests for PHP

PHP HTTP client library with simple request API

Requests for PHP screenshot

Requests for PHP sends HTTP requests with a small array-based API. It wraps cURL or fsockopen so callers avoid low-level socket or cURL details.

Overview

Requests is an HTTP library for PHP positioned for straightforward use in application code. Its API is modeled after the Python Requests project. It depends only on PHP 5.6.20 or newer and ships under an ISC-style license.

The library supports HEAD, GET, POST, PUT, DELETE, and PATCH with headers, form fields, multipart files, and parameters expressed as arrays. Responses expose status, headers, and body through the same style of structures. Transport uses cURL when available and falls back to fsockopen while keeping a consistent interface.

Documented features include international domains and URLs, browser-style SSL verification, basic and digest authentication, automatic decompression, and connection timeouts. Install via Composer as rmccue/requests, clone with autoload registration, or use PSR-4 loaders. PHPDoc covers the API; prose guides walk through typical calls.

PSR-7 and PSR-18 post-date the core library, which does not ship native implementations; a separate community package adapts Requests as a PSR-18 client. WordPress maintains the project and discusses HTTP API work in its Slack core-http-api channel.

Key features

  • GET POST PUT PATCH DELETE HEAD
  • cURL and fsockopen transports
  • SSL verification and auth hooks
  • Multipart and form uploads
  • Automatic response decompression
  • Connection timeout support
  • Composer and manual install paths

Use cases

  • Calling REST APIs from PHP apps
  • WordPress plugin HTTP integrations
  • Replacing raw cURL in legacy PHP
  • Fetching JSON with simple headers

Tags

Similar software

axios

Promise-based HTTP client for browser and Node.js

Axios is a promise-based HTTP client for JavaScript environments in the browser and Node.js. It supports common request methods, configurable defaults, and interceptors for request and response handling.

★ 109.5k⟳ 2 days agoMIT

FastAPI

Python web framework for building APIs with type hints

FastAPI is a Python web framework for building APIs using standard type hints. It builds on Starlette and Pydantic and generates interactive OpenAPI documentation for the endpoints you define.

★ 105.1k⟳ 9 days agoMIT

OmniRoute

OpenAI-compatible AI gateway with provider routing

OmniRoute exposes one endpoint that routes chat requests across many LLM providers with quota-aware fallback and compression.

★ 90.7k⟳ todayMIT

Hoppscotch

Web, desktop and CLI API development ecosystem

Hoppscotch lets developers send HTTP, WebSocket, GraphQL, and related API requests from a lightweight client. Collections, environments, teams, and sync help organize testing across devices.

★ 81k⟳ 5 days agoMIT
Open Source Alternative to:Postman

NestJS

Progressive TypeScript framework for Node.js backends

Nest organizes Node server apps with modules, dependency injection, and first-party packages for auth, data, queues, and observability.

★ 77.2k⟳ todayMIT

JSON Server

Zero-code mock REST API from JSON data files

JSON Server turns a JSON or JSON5 database file into a REST API for local prototyping. It supports filtering, sorting, pagination, embedding relations, and static assets.

★ 75.7k⟳ 8 months agoMIT