When trying to send a post request to authenticate user
i.e.
curl -X POST \
'http://localhost/Drupal/user/login?_format=json' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F 'name="admin"' \
-F 'pass="admin"'
Getting error:
The website encountered an unexpected error. Please try again later
.
Message:
Symfony\Component\Serializer\Exception\NotEncodableValueException: Syntax error in Symfony\Component\Serializer\Encoder\JsonDecode->decode() (line 78 of F:\Program Files\\Drupal\vendor\symfony\serializer\Encoder\JsonDecode.php).
in public function decode($data, $format, array $context = []){}, $data is empty