0

Actually I create rest api using apache camel. Its a Get Call.

Request Path like this -> users/names/{username}?client={clientId}

we will try to given username is Spanish text like this -> users/names/plánia?client=100

Its throw error like bad request

{
   "timestamp": "2020-06-17T16:06:25.609+0000",
   "status": 400,
   "error": "Bad Request",
   "message": "Illegal Argument Specified in the Request Headers or Path",
   "path": "/users/names/plánia"
 }
navihr
  • 13
  • 1
  • 4
  • 1
    Make sure that you understand `@RequestParam` vs `@PathVariable` https://stackoverflow.com/questions/13715811/requestparam-vs-pathvariable – Quang Nguyen Jun 17 '20 at 19:18

1 Answers1

1

A URL is composed from a limited set of characters belonging to the US-ASCII character set. These characters include digits (0-9), letters(A-Z, a-z), and a few special characters.

á does not come under US-ASCII. You should try URL encoding before firing such GET request.

Nish
  • 922
  • 13
  • 31