Welcome Guest, Not a member yet? Register   Sign In
CurlRequest.php Error
#1

(This post was last modified: 06-22-2019, 07:27 AM by viewfromthenorth. Edit Reason: link generalized )

I am playing around with CI4 and trying to get the CurlRequest.php library working. I'm following the instructions in the user guide, trying to just get a simple request built but I'm getting the below error. This seems as basic as I can possibly get it, according to the user guide. Am I missing something? Also, I'm using the develop branch at the moment.

Code:
<?php namespace App\Controllers;

class Home extends BaseController
{
    public function index()
    {
        $client = \Config\Services::curlrequest([
           'base_uri' => 'https://example.com/exe',
       ]);

        d($client);

       $response = $client->request('POST', '/hello_world.pf', [
           'form_params' => [
               'name' => 'Andrew'
           ]
       ]);

       d($response);
   }
}


ErrorException

curl_setopt_array(): supplied argument is not a valid File-Handle resource 
Reply


Messages In This Thread
CurlRequest.php Error - by viewfromthenorth - 06-22-2019, 05:28 AM
RE: CurlRequest.php Error - by mightyted - 06-27-2019, 07:40 AM
RE: CurlRequest.php Error - by viewfromthenorth - 06-28-2019, 07:43 PM
RE: CurlRequest.php Error - by angrymongol - 10-01-2019, 10:20 AM
RE: CurlRequest.php Error - by mightyted - 10-01-2019, 01:18 PM
RE: CurlRequest.php Error - by John_Betong - 10-01-2019, 10:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB