1

I want to use a package (Cloudinary) to upload an image, after all the setup, I am getting an errorenter image description here

This is the code from Cloudinary documentation,

        $uploadedFileUrl = cloudinary()->upload($request->file('profile_image')->getRealPath())->getSecurePath();

So I can't set Guzzle verification to false in this way

    $client = new Client([
        'base_uri' => ''
,       'headers' => $headers,
        'verify' => false,
        'VERIFY_PEER' => true,
        'http_errors' => false,
    ]);

My problem is, how do I set Guzzle Http Client verification to false, generally in the application

KINGSLEY OKPARA
  • 549
  • 1
  • 5
  • 16

1 Answers1

1

If you want to add any Guzzlehttp's options within Laravel app you can just use the withOptions method. https://laravel.com/docs/9.x/http-client#guzzle-options

Http::withOptions([
    'verify' => false,
])->get('http://whatever.com');
MohKoma
  • 964
  • 9
  • 9