0

I have one question about encoding diacritic chars in API request.

I can send via postman request GET /rest/city?query=Poznań, response is correct, in server logs city?query=Poznań is changed to city?query=Pozna%C5%84.

Also I have API test written in node.js (mocha, supertest) and here request GET /rest/city?query=Poznań return empty array, in server logs request method changed to GET /rest/city?query=PoznaD.

What's wrong with encoding in my API auto tests? Why ń changed to D? Do You know how can I changed this to fix issue.

Also in logs city?query=Łódz changes in changes in city?query=Aódz

Abdul Hoque Nuri
  • 1,105
  • 1
  • 9
  • 18
mtmx
  • 827
  • 1
  • 10
  • 31

1 Answers1

0

Ok, i have solution, just city?query=${encodeURI(Łódź)}

mtmx
  • 827
  • 1
  • 10
  • 31