php - Guzzle\Post works, but with createRequest I get null -
so works:
$request = $this->client->post($this->getrequestpath(), [ "body" => [ "grant_type" => "client_credentials", "client_id" => $this->config['client_id'], "client_secret" => $this->config['client_secret'], "scope" => $this->config['scope'], ], "debug" => true ]);
however not work
$request = $client->createrequest($type, $this->getrequestpath(), ['body' => $parameters, "debug" => true] ); $client->send($request);
i work createrequest
because can see, want flexible on type of request send.
any ideas why not working? debug study , seems fine, null
homecoming value, , think body transferred differently post
method why api not pick correctly.
i appreciate help.
okay, work this, thing is, requests require "query" instead of "body".
php request guzzle
No comments:
Post a Comment