I have a basic silex application, and I try to test it using HTTPie. Yet when posting using:
http POST http://localhost:1337 data="hello world"
The data
, that I get from the Request object via:
$data = $request->request->get('data');
will always be empty. What is the problem here?
It was an httpie usage problem as the
form
flag was necessary, as silex requires the parameters to be form-encoded, yet the default of HTTPie is to pass a JSON object.