Php – Why are the headers empty?
I am trying to get a simple redirection to work with GuzzleHttp and am using phpunit to test my code. The expected behavior is that if the requested URL ends with a "/" then the response should be a redirection…
I am trying to get a simple redirection to work with GuzzleHttp and am using phpunit to test my code. The expected behavior is that if the requested URL ends with a "/" then the response should be a redirection…
I've created an OpenAI-powered platform for teachers in my district to create AI Bots that have thematic chats with students (i.e. why is socialism so polarizing in the US, etc). These chats are saved in a database, and a teacher…
$endpoint = rtrim($site->url,"/").'/'.env('WP_ENDPOINT'); try { $request = Http::post($endpoint); dd($request); } catch (GuzzleHttpExceptionConnectException $e) { $response = json_encode((string)$e->getResponse()->getBody()); } I am trying to get response from a remote URL using guzzle http client but i get error 'cURL error 6: Could…
I am trying to set cookies using the Laravel HTTP client. I know Laravel uses guzzlehttp/guzzle library in the backend. This is the error I am getting when I try to set the cookies using withOptions method. Have anyone figured…
i want to test an api-client. the api-client uses IlluminateSupportFacadesHttp to make requests. when i use it in tinker everything is ok: > $response = Bitwarden::listItems() = IlluminateSupportCollection {#6782 all: [ {#6854 +"object": "item", .... }, ], } My test…
Best regards, I'm using Guzzle 7 with Laravel 8, and I need to pass a path variable, at least that's how it is called with postman, this my code $client = new GuzzleHttpClient(); $response = $client->get('xxxxxxxxxxxxxx', [ 'params' => ['dni'…
When I send a plain GET request with Postman this takes about 228ms consistently and yields a json response. As you can see I disabled cookies and headers in the request to have the exact same request. The generated curl…
I am trying to make a http client request in Laravel. I have tried using guzzle directly and it works, but when doing it through "API around the Guzzle HTTP client" in laravel, I always get a 400. I can't…
I have an http request that uses a key, certificate, and certificate chain. How can it be translated to Guzzle? The problem is that I do not know how to add all my certificates to the Guzzle request. In the…
I am using Guzzle 7.2 in my Laravel app. When Laravel Filemanager makes request towards Dropbox it uses Guzzle. The problem I face is that I get cURL error 60: SSL certificate problem, I have found out that Guzzle throws…