[Solved] Symfony 4 – Send POST request with multipart/form-data


Okay I used $request->request->get() to extract my values , like this :

$entityManager = $this->getDoctrine()->getManager();

$user = new User();
$user->setLogin($request->request->get('login'));
$user->setPassword($request->request->get('password'));
$entityManager->persist($user);
$entityManager->flush();

And then I serialize my values in a JSON object, it’s working perfectly ^^ Thanks for your help! ^^

5

solved Symfony 4 – Send POST request with multipart/form-data