guzzle Questions

4

Solved

I'm using Guzzle in a set of PHPUnit-powered tests for a REST API. I create my client as follows: use GuzzleHttp\Client; $client = new Client(['base_url' => ['http://api.localhost/api/{versio...
Cavalcade asked 12/8, 2014 at 15:56

14

Solved

Trying to use the YouTube API v3 to get some video(s) information, using Guzzle in Symfony2 using Service Descriptors. When I run the script, I get this: [curl] 60: SSL certificate problem: un...
Eldin asked 24/7, 2014 at 1:13

4

Guzzle http is truncating exceptions with more than 120 characters, but I need to log the full exception message. How can I do this? I am using laravel 4.2.22.
Naoise asked 20/12, 2018 at 5:21

5

Solved

Hello I am testing the endpoint and when I run php testing.php I get this error. Any help would be appreciated it. Fatal error: Uncaught exception 'Guzzle\Http\Exception\CurlException' with messag...
Greenquist asked 14/3, 2016 at 1:35

6

Solved

How to make a post request with GuzzleHttp( version 5.0 ). I am trying to do the following: $client = new \GuzzleHttp\Client(); $client->post( 'http://www.example.com/user/create', array( '...
Hagy asked 7/1, 2015 at 17:58

4

Solved

When posting form I am getting this exception Unresolvable dependency resolving [Parameter #0 [ $method ]] in class GuzzleHttp\Psr7\Request Searched and tried many ways to solve this but no progr...
Obovoid asked 27/11, 2017 at 19:47

7

I have a problem with set proxy in guzzle that a blank page was shown while with curl everything works perfect. The code that I used in guzzle and curl came below. What is wrong with this code: Guz...
Jala asked 1/9, 2015 at 6:26

5

This should be an easy thing to do. I can find plenty of references to how to do it in Guzzle 3, but they don't work in Guzzle 5. What I am doing so far: $this->client = new GuzzleClient(['def...
Chaldean asked 21/1, 2015 at 11:43

3

Solved

While working on a project I found third party API's are working from Postman, but doesn't work from Guzzle Client. Debugging a Guzzle request could be difficult, so is there any way that can log...
Conducive asked 17/8, 2019 at 8:27

4

Solved

Need help using Guzzle 6 for downloading a file from a rest API. I don't want the file to be saved locally but downloaded from web browser. Code so far below, but believe I am missing something? ...
Jameson asked 20/8, 2019 at 17:14

6

Solved

i want to configure a a small timeout between my elasticsearch php client to the my elasticsearch server. i tried to pass some parameters to the guzzle client but it seems this doesn't work. here ...
Olli asked 25/8, 2014 at 17:21

3

I am accessing the Echo Nest API, which requires me to repeat the same uri parameter name bucket. However I can't make this work in Guzzle 6. I read a similar issue from 2012, however the approach ...
Recuperator asked 12/11, 2015 at 13:7

3

Solved

I use the guzzlehttp/guzzle package in Laravel 8. After upgrading to PHP 8, I get: Symfony\Component\ErrorHandler\Error\FatalError: Invalid opcode 117/2/0. in file ../vendor/defuse/php-encryption/...
Entasis asked 27/11, 2020 at 7:43

2

Solved

I need to integrate an API so I write function: public function test() { $client = new GuzzleHttp\Client(); try { $res = $client->post('http://example.co.uk/auth/token', [ 'headers' =&gt...
Dobbin asked 5/4, 2018 at 21:6

3

Solved

I seem to be running into a weird issue. I am triggering a post request using the Http facade from a laravel app to another laravel app. Both these apps are linked to separate databases. When I try...
Lallation asked 16/8, 2021 at 12:48

2

Solved

I'm trying to run LaunchDarkly and within the code it says that I need to initialize my class like so $client = new LDClient("MY_CLIENT_KEY"); Now I was able to do that but an error occured belo...
Testator asked 2/2, 2017 at 5:32

4

Solved

I'm trying to use guzzle 6 which works fine but I'm lost when it comes to how to log all the api calls. I would like to simply log timing, logged in user from session, url and any other usual perti...
Braithwaite asked 20/9, 2015 at 15:39

4

Solved

I'm scraping from a UTF-8 site, using Goutte, which internally uses Guzzle. The site declares a meta tag of UTF-8, thus: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> ...
Biaxial asked 13/9, 2013 at 9:3

2

Solved

How can I retrieve the cookies from a Guzzle request / client, after a request has occurred? $client = new Client([ 'base_uri' => 'www.google.com', ]); $response = $client->request('GET', '...
Squatness asked 10/7, 2017 at 22:30

3

Solved

I am doing unit testing in PHP for a site that requires authentication. Authentication is cookie based, so I need to be able to put a cookie like this in the cookie jar: [ 'user_token' => '2c26...
Afrikaner asked 5/2, 2017 at 21:7

4

Solved

I have a form where I can upload multiple files to my laravel backend and I wand to send all those files with Guzzle to external API I'm having an issue where my script is running out of memory if ...
Sourpuss asked 27/5, 2021 at 18:50

5

Solved

I am trying to upload file and send post parameters at the same time like this: $response = $client->post('http://example.com/api', [ 'form_params' => [ 'name' => 'Example name', ], '...
Dorado asked 4/6, 2015 at 14:3

4

Solved

I have a command for Symfony/Console which downloads several files at once using Guzzle Pool. I already have Guzzle reporting the download progress for each file, that works fine. Now I'd like to ...
Kessinger asked 15/4, 2017 at 9:50

3

Solved

We are starting to use Guzzle in PHP with code which calls a variety of different APIs, a few of which don't support TLSv1.2 and some of which require TLSv1.2. What's the best way to force Guzzle ...
Churchyard asked 14/10, 2015 at 19:46

4

Solved

I am developing a plugin that used composer.. meaning it has a vendor folder inside the plugin folder which includes Guzzle HTTP dependency On wordpress site we installed this plugin, there is an ...
Chiseler asked 2/5, 2018 at 23:13

© 2022 - 2024 — McMap. All rights reserved.