Giter VIP home page Giter VIP logo

Comments (7)

rdlowrey avatar rdlowrey commented on July 3, 2024

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.

harikt avatar harikt commented on July 3, 2024

@rdlowrey I am specifically testing a few things like how fast a fetching system can increase when using asynchronous client .

from http-client.

harikt avatar harikt commented on July 3, 2024

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.

rdlowrey avatar rdlowrey commented on July 3, 2024

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.

harikt avatar harikt commented on July 3, 2024

Thank you @rdlowrey .

from http-client.

harikt avatar harikt commented on July 3, 2024

Another interesting thread here FastFeed/FastFeed#13

from http-client.

kelunik avatar kelunik commented on July 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.