0

We have some endpoints that receive a username, the username may contain special characters, for example: POST /api/users/{userName}/cars/

if the username is "joe+doe", then we have a 404 error, we have enconded and send POST /api/users/joe%2Bdoe/cars/

Still it doesn't work

We could either change to an id or change it into a format like "api/users/cars?username={username}" but we would like to follow the logic we have.

So the question is "is there a way to configure endpoints in rest api to accepts encoded chars"

MetalGeorge
  • 321
  • 6
  • 16
  • You could encode the username in base 64 and in server side decode it – dcg Mar 27 '19 at 23:43
  • Possible duplicate of [Dots in URL causes 404 with ASP.NET mvc and IIS](https://stackoverflow.com/questions/11728846/dots-in-url-causes-404-with-asp-net-mvc-and-iis) – Heretic Monkey Mar 27 '19 at 23:43
  • Please share your routing configuration with us. An [mcve] would be preferred. –  Mar 27 '19 at 23:44

0 Answers0