简体   繁体   中英

Getting java.net.URISyntaxExceptiin: Illegal character error when we pass space in url for GET method

'''

Get url baseurl + ‘/api/Search 1’

When method GET

Then print response

'''

Throwing error

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%201
1 > Host: httpbin.org

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM