Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

realtebo's avatar

Is there some api consumer package ?

I'm fighting againsta GuzzleHttp and I'm loosing.

Is there a package for Laravel to consume http api? (not standard, not restfull, ... a lot of caotic api call with different methods, headers, auth, ... a caos...)

If I don't want to use Guzzle manually, have you something to suggest me? (Yes, I could change job)

0 likes
1 reply
bobbybouwmann's avatar

I would personally still use Guzzle for your use case. I always build wrappers around guzzle and use that. So if you, for examplehave a call to fetch all customers from some API I build a wrapper around that calledCustomerService`. In there you can do all the guzzle logic.

Also for reusing guzzle clients, I put them in the container as a singleton. This way you can dependency inject them and reuse them in different service classes.

Please or to participate in this conversation.