Questions tagged [artax]

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

4 questions
1
vote
1 answer

Crate PDO driver installation using composer.phar fails

I'm trying to install the Crate PDO driver from here: https://github.com/crate/crate-pdo The manual says to use composer.phar like so: php composer.phar require crate/crate-pdo:~0.0.3 However, that produces the following: Your requirements could…
Michael
  • 1,247
  • 1
  • 8
  • 18
0
votes
0 answers

How to make post request with Artax

I am testing abilities php using laravel/lumen as server side framework. I have exisitng project and new task is to make multiple requests at the same time. I found amphp/parallel package which could help me. But documentation says to use Artax…
0
votes
1 answer

How to make Amphp pool/queue of multiple requests? And where is Curl handler?

There is an example/test code made with the use of GuzzleHttp: use GuzzleHttp\Client; use GuzzleHttp\Handler\CurlHandler; use GuzzleHttp\HandlerStack; use GuzzleHttp\Middleware; use GuzzleHttp\Pool; use Psr\Http\Message\ResponseInterface; require…
iorsa
  • 60
  • 6
0
votes
2 answers

ByPass SSL certificate validation with Artax

When making a POST request to a server with an invalid SSL certificate ( Cloudflare has to reissue the certificate ), Artax returns the following error: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: …
bdb.jack
  • 147
  • 1
  • 8