When I send POST request that body request contains some special character like ß, actually it is a character in German like "Zentrale Bußgeldstelle". And bellow is the information of request I sent by using curl run on Gitbash:
curl --location --request POST 'http://localhost:8080/user/v1/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "ßtest",
"password": "P@ssword"
}'
And I got the bad request status as below:
{
"timestamp":"2020-06-27T05:22:50.676+0000",
"status":400,
"error":"Bad Request",
"message":"JSON parse error: Invalid UTF-8 middle byte 0x74\n at [Source: (PushbackInputStream);
line: 1, column: 18]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Invalid UTF-8 middle byte 0x74\n at [Source: (PushbackInputStream); line: 1, column: 18]\n at [Source: (PushbackInputStream); line: 1, column: 15] (through reference chain: com.example.springlogin.dto.UserDto[\"username\"])",
"path":"/user/v1/register"
}
I faced that it related to ß character. But the issue not occur when I send that request using postman.I used Springboot to implement that api.
So anyone can help to solve my above issue. Thanks in advance