Artax is an asynchronous HTTP/1.1 client built on the Amp concurrency framework.

Artax is an asynchronous HTTP/1.1 client. 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.

It allows you to write highly performant code to send and process HTTP requests using completely asynchronous processing.

The library is available at https://github.com/amphp/artax

Features

  • Requests asynchronously
  • Pools persistent "keep-alive" connections
  • Transparently follows redirects
  • Decodes gzipped entity bodies
  • Exposes raw headers and message data
  • Streams entity bodies for managing memory usage with large transfers
  • Supports all standard and custom HTTP method verbs
  • Simplifies HTTP form submissions
  • Implements secure-by-default TLS (https://) with userland support for new PHP 5.6 encryption features in older PHP versions
  • Limits connections per-host to avoid IP bans in scraping contexts
  • Supports cookies and sessions
  • Functions seamlessly behind HTTP proxy servers

Related tags