0

I have a ServerRequestInterface $request and when I call

$body = $request->getBody()->getContents()

it returns {"email":"a@b.com","password":"password"}, but $request->getParsedBody() returns an empty array[0].

This is a POST request.

Anyone know what might be going on here?

I'm using Zend Expressive if that matters (it shouldn't unless it's a bug).

Zend\Diactoros\ServerRequest

edigu
  • 9,878
  • 5
  • 57
  • 80
Bluebaron
  • 2,289
  • 2
  • 27
  • 37

0 Answers0