Home > Software engineering >  Getting java.net.URISyntaxExceptiin: Illegal character error when we pass space in url for GET metho
Getting java.net.URISyntaxExceptiin: Illegal character error when we pass space in url for GET metho

Time:01-20

‘’’

Get url baseurl   ‘/api/Search 1’

When method GET

Then print response

‘’’

Throwing error

CodePudding user response:

Use path for this. Refer the docs: https://github.com/karatelabs/karate#path

Try this following test and see it work:

* url 'https://httpbin.org/anything'
* path 'api', 'Search 1'
* method get

Actual request:

1 > GET https://httpbin.org/anything/api/Search 1
1 > Host: httpbin.org
  • Related