Giter Club home page Giter Club logo

Comments (3)

slepic avatar slepic commented on June 21, 2024 1

Well, actualy I just realized that Gt\Fetch\Http implements Http\Client\HttpClient which in turn extends the PSR-18 Psr\Http\Client\ClientInterface already.
But if there was PSR-18 client injected as dependency, it would be really nice, because you can then get rid off all the mess with curl, and have users inject their preferred implementation of psr 18 client and this library can focus on the async part. Making it async http client over any psr 18 client. This seems much more flexible then an async http client that also, along the way, provides unnecesarily complicated implementation of psr 18 client.

So Actualy maybe I vote against having Gt\Fetch\Http implements Psr18 ClientInterface. I vote for it to be injected dependency.

from fetch.

Sotiris-k avatar Sotiris-k commented on June 21, 2024

It would certainly be a good thing for those rare occassions where, for instance, cURL is not fully available.

from fetch.

g105b avatar g105b commented on June 21, 2024

It's been some time since I've added functionality to this repo, but I'm currently working on branch 89-async to make many improvements, one of which is the change to making @slepic's suggestion: Fetch is now compatible with other Http\Client\HttpClient implementations, but does not try to implement it itself.

Will be released to v2 once I've completed the other compatibility improvements.

Thanks and happy new year!

from fetch.

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.