Category "guzzle"

Laravel Http client before request send add headers

I'm using Http client for making outgoing HTTP requests. I've used it many places in the project.Now project has new requirement that I have to add a new header

POSTING XML USING GUZZLE CLIENT LARAVEL

I am a laravel junior developer and i have been using gazzle http for handling my requests, now i have a task of integrating Collections to a system. The provid

Trying to mock an http client that is inside a controller, using phpunit, but it doesn't work

I have to test the routes of a controller which uses Guzzle Wrapper as a client to get data from an API. The app uses Laravel as a framework. This is the part o

Guzzle Not Sending Grant Type to Laravel Passport

Im a little stumped with my code, I am running Laravel 6 with Guzzle Http Client version 6.3.3. I have opted to use a trait which I use on my API Gateway for c

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttp\Psr7\Request

When posting form I am getting this exception Unresolvable dependency resolving [Parameter #0 [ $method ]] in class GuzzleHttp\Psr7\Request Searched and trie

How do I do HTTP basic authentication using Guzzle?

I want to do basic access authentication using Guzzle and I am very new to programming. I have no clue what to do. I tried to do this using curl but my environm

GuzzleHttp Hangs When Using Localhost

Here is a simple code snipplet but this just hangs and unresponsive. $httpClient = new GuzzleHttp\Client(); // version 6.x $headers = ['X-API-KEY' =&g

PHPUnit - REST API testing

I have REST API written in php, i want to test it with phpunit. I wrote test like this, it works but response body was empty. I tested it with fiddler, it se

Docker. Communication between Laravel containers

I have a project that I am trying to develop with a microservices approach. I prepared the APIs on two separate microservices and completed their tests. When I