0

i'm building a REST API and was wondering how i would go about retrieving a user data by using his name. I currently have the URI example.com/rest/users/{name} , however if someone contain a slash in his name this wouldn't work. So How would i do this? (using Jersey)

Wally
  • 47
  • 7

2 Answers2

2

You can do:

 example.com/rest/users?name={encoded name} 
Iliiaz Akhmedov
  • 867
  • 7
  • 17
-1

Can you check this one?

slashes in url variables

It mentions that

You need to escape the slashes as %2F
Community
  • 1
  • 1
Atul Kumbhar
  • 1,073
  • 16
  • 26