I want to send a request with guzzle that looks like this.
Thing is, I always get
Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error:
POST http://localhost:8080/project/user/login
resulted in a400 Bad Request
Here is the part of the code that creates and sends the request:
if (isset ($_REQUEST['username']) && isset($_REQUEST['password'])){
require '../php/vendor/autoload.php';
$myClient = new GuzzleHttp\Client();
$request = $myClient->post("http://localhost:8080/project/user/login");
$request->setBody($_REQUEST['username']. ',' . $_REQUEST['password']);
$feed_response = $request->send();
I've read most of the guzzle's manual, but it got me nowhere.