06-22-2019, 05:28 AM
(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.
ErrorException
curl_setopt_array(): supplied argument is not a valid File-Handle resource
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