Comments (7)
Not yet. This is one of those things I haven't bothered with yet as I'm trying to lock everything down for the official v1.0.0 (scheduled to be released within the next few days). I'm in feature freeze at this time. TBH this particular feature is fairly trivial to implement, which has led to a bit of procrastination on my part in adding it :)
Since you mentioned it, though, I'll bump it up my personal priority list. If it's something you really need for a specific reason I can make it happen sooner rather than later. I'll try to find a couple of hours this week to implement it. If I have time to thoroughly test it I will add it in for v1.0, but most likely it will come in v1.1.
from http-client.
@rdlowrey I am specifically testing a few things like how fast a fetching system can increase when using asynchronous client .
from http-client.
I am still playing this is the use case I am looking
<?php
require __DIR__ . '/vendor/autoload.php';
$reactor = Amp\reactor();
$promiseArray = (new Amp\Artax\Client($reactor))
->requestMulti([
'feed1' => 'http://example1.com/blog/feed',
'feed2' => 'http://example1.com/blog/feed',
'feed3' => 'http://example1.com/blog/feed',
]);
foreach ($promiseArray as $promise) {
$promise->when(function(Exception $error = null, $response = null) {
if ($error) {
// something went wrong :(
} else {
$request = $response->getOriginalRequest();
printf("\nHTTP/%s %d %s for %s \n",
$response->getProtocol(),
$response->getStatus(),
$response->getReason(),
$request->getUri()
);
}
});
}
// Nothing will happen until the event reactor runs.
$reactor->run();
from http-client.
I see. I'll work to add caching support in the coming days so you can accurately compare results between different libs. I'll update this thread as progress happens.
from http-client.
Thank you @rdlowrey .
from http-client.
Another interesting thread here FastFeed/FastFeed#13
from http-client.
This can be implemented on top of Client
as it's an interface. A CachingClient
would simply delegate to BasicClient
if there's nothing in the cache.
from http-client.
Related Issues (20)
- Memory leak HOT 8
- 5.x: Undefined array key 1689, Http2ConnectionProcessor.php:1316 HOT 5
- 5.x: Review Form API
- Memory issue in HTTP 2 connection HOT 1
- 5.x: Call to a member function getFuture() on null HOT 3
- If a response redirects, it sends back raw gzip instead of decoded content HOT 1
- `Form` not sent with same semantics as `FormBody` HOT 4
- Remove UnprocessedRequestException HOT 1
- Beta 11 encodes repeated form fields differently HOT 2
- Double redirect still returns gzip compressed data
- 4.x's php version depends changed because of league/uri HOT 2
- Log errors in LogHttpArchive
- [v5.0.0-beta.14] Invalid request phase transition from Connect to RequestHeaders HOT 4
- Amp\Http\Client\TimeoutException: Allowed transfer timeout exceeded, took longer than 10 s in /home/madeline/vendor/amphp/http-client/src/Connection/Internal/Http2ConnectionProcessor.php:1562 HOT 1
- Allow detection whether a connection has been reused
- [v5.0.0 Beta 15] Invalid request phase transition from Rejected to Failed HOT 1
- requestEnd() is not called in event listener in sync mode. HOT 5
- Response streaming during request upload
- Invalid certificate throws a misleading error
- [5.1.0] Deadlock and warnings when Http2 connection breaks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http-client.