Search code examples
resturl-encoding

rest api with space followed by number


I have to access a rest API and one of the attribute has a space followed by a number. I know that I have to replace spaces by %20 but what if it is followed by a number?

For exemple:

http://myapi/ressource?query={user-22[*%203.2.2.0]}

Solution

  • I found finally a way, I used

    http://myapi/ressource?query=%7Buser-22%5B*%25203.2.2.0%5D%7D
    

    The difference is %2520 instead of %20 only