Artax is an asynchronous HTTP client for PHP based on Amp

Overview

⚠️ This package has been replaced by http-client

artax

Build Status CoverageStatus License

Artax is an asynchronous HTTP client for PHP based on Amp. Its API simplifies standards-compliant HTTP resource traversal and RESTful web service consumption without obscuring the underlying protocol. The library manually implements HTTP over TCP sockets; as such it has no dependency on ext/curl.

Features

  • Requests asynchronously for full single-threaded concurrency
  • Pools persistent keep-alive connections
  • Transparently follows redirects
  • Decodes gzipped entity bodies
  • Exposes headers and message data
  • Streams entity bodies for memory management with large transfers
  • Supports all standard and custom HTTP method verbs
  • Simplifies HTTP form submissions
  • Implements secure-by-default TLS (https://)
  • Supports cookies and sessions
  • Functions seamlessly behind HTTP proxies

Project Goals

  • Model all code as closely as possible to the relevant HTTP protocol RFCs
  • Implement an HTTP/1.1 client built on raw socket streams with no libcurl dependency

Installation

This package can be installed as a Composer dependency.

composer require amphp/artax

Documentation

Documentation is bundled within this repository in the docs directory.

Examples

More extensive code examples reside in the examples directory.

Versioning

amphp/artax follows the semver semantic versioning specification like all other amphp packages.

Version Bug Fixes Until Security Fixes Until
3.x Supported, no end date, yet. Supported, no end date, yet.
2.x Unmaintained. Unmaintained.
1.x Unmaintained. Unmaintained.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.

You might also like...
⚓️ Easily test HTTP webhooks with this handy tool that displays requests instantly.

Webhook.site With Webhook.site, you instantly get a unique, random URL that you can use to test and debug Webhooks and HTTP requests, as well as to cr

A Magento 1.x module which facilitates automatic purging of static assets from HTTP caches such as browser cache, CDN, Varnish, etc using best practices outlined within the HTML5 boilerplate community.

Magento Cachebuster Cachebuster is a Magento module which facilitates automatic purging of static assets from HTTP caches such as browser cache, CDN,

A simple HTTP server behaving as proxy between webhooks and Appwrite Functions.
A simple HTTP server behaving as proxy between webhooks and Appwrite Functions.

A simple HTTP server behaving as proxy between webhooks and Appwrite Functions, allowing for instance Stripe payments integration into Appwrite.

An alternative to run cron jobs that uses simple HTTP requests

SilverStripe Simple Jobs An alternative to run cron jobs that uses simple HTTP requests. This module require SilverStripe CronTask. Why? Configuring c

Integrate reCAPTCHA using async HTTP/2, making your app fast with a few lines.
Integrate reCAPTCHA using async HTTP/2, making your app fast with a few lines.

ReCaptcha Integrate reCAPTCHA using async HTTP/2, making your app fast with a few lines. use Illuminate\Support\Facades\Route; Route::post('login', f

Simple HTTP smoke testing for your Symfony application

Shopsys HTTP Smoke Testing This package enables you to do simple HTTP smoke testing of your Symfony application. Basically, it generates a HTTP reques

Profiles HTTP/SOCKS proxy(s) as multithreaded in seconds.

NextGen Proxy Profiler The scanner (proxyprof) scans and analyzes http/https/socks4/socks5 proxies quickly. It can complete thousands of proxy scans i

A simple package to send HTTP header responses ✨

PHP HTTP Response Simple PHP package to easily send the right HTTP header responses to the browser 🐘 Requirement PHP v8.0 or higher 🚀 Installation T

A text-based, persistent browser-based strategy game (PBBG) in a fantasy war setting
A text-based, persistent browser-based strategy game (PBBG) in a fantasy war setting

Note: OpenDominion is still in development. Some features of the game have not been implemented yet. Introduction OpenDominion is a free and open-sour

Comments
  • Update amphp file

    Update amphp file

    Updated amphp/file dependency to ^1.0.

    It's needed to make it possible to require both amphp/artax and amphp/file in a project without lowering min-stability.

    opened by JustBlackBird 0
  • Argument 2 passed to Amp\\Artax\\ConnectionInfo::__construct() must b…

    Argument 2 passed to Amp\\Artax\\ConnectionInfo::__construct() must b…

    Argument 2 passed to Amp\Artax\ConnectionInfo::__construct() must be of the type string, null given. In some cases cannon retrieve remote address, method $socket->getRemoteAddress() return null, but for class ConnectionInfo second argument must be a string only.

    opened by positive2407 2
Owner
AMPHP
AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind.
AMPHP
Asynchronous WebSocket client

Pawl An asynchronous WebSocket client in PHP Install via composer: composer require ratchet/pawl Usage Pawl as a standalone app: Connect to an echo s

Ratchet 528 Dec 15, 2022
AMP Optimizer PHP library

AMP Toolbox for PHP A collection of AMP tools making it easier to publish and host AMP pages with PHP. The following tools are part of this library: A

AMP 71 Dec 28, 2022
An async process dispatcher for Amp.

process This package provides an asynchronous process dispatcher that works on all major platforms (including Windows). As Windows pipes are file hand

AMPHP 204 Jan 8, 2023
Asynchronous iterators and operators.

pipeline Asynchronous iterators and operators. Installation This package can be installed as a Composer dependency. composer require amphp/pipeline Ve

Amp 16 Nov 18, 2022
A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.

Laravel SES Tracking Setup the AWS infrastructure to handle email events using SES/SNS and http/s endpoints with a single Laravel artisan command. Thi

null 11 Apr 26, 2022
🏆 Learn You PHP! - An introduction to PHP's core features: i/o, http, arrays, exceptions and so on.

Learn You PHP! The very first PHP School workshop. A revolutionary new way to learn PHP Bring your imagination to life in an open learning eco-system

PHP School 311 Dec 30, 2022
This repository demonstrates exemplary implementation of chat using HTTP and Websocket servers in PHP using Kraken Framework components.

This repository demonstrates exemplary implementation of chat using HTTP and Websocket servers in PHP using Kraken Framework components.

Kraken 48 Aug 11, 2021
Integrate your PHP application with your HTTP caching proxy

FOSHttpCache Introduction This library integrates your PHP applications with HTTP caching proxies such as Varnish. Use this library to send invalidati

FriendsOfSymfony 338 Dec 8, 2022
urldecode'ing of all HTTP parameters in Lumen project

Request UrlDecode Description This package is intended to perform urldecode of all HTTP parameters in Lumen project. Lumen for some reason does not do

null 1 Dec 13, 2021