skeith22
1 year ago
247
2
General

Guzzle HTTP Says Magic request methods require a URI and optional options array

Posted 1 year ago by skeith22

Does anyone know how to fix this?

I have this code

$client = new Client();

$client->request('POST', 'https://my-domain.com/, [
    'form_params' => [
        'action' => 'read'
    ],
    'headers' => [
        'Authorization' => 'Bearer 57aa62501a7fe0d3b71de5712cdb1998'
    ]
]);

return $client->getBody();

Please sign in or create an account to participate in this conversation.