Forum Discussion

MrGcube's avatar
MrGcube
Occasional Visitor
7 years ago

How to disable URL encoding via groovy script?

We are executing test cases in which we would like to pass special characters in our URLs to make sure our endpoints handle these scenarios gracefully.

 

We currently set the URL for each request as below, where requestData.getUrl() returns a URL with special characters in its endpoint:

// Set the endpoint
testStep.setPropertyValue("endpoint", requestData.getUrl())

 

The URL set would take the form of something similar to this: 

<hidden_base_url>/resourcepath/abc$£12/morepath

 

When making the request, we can see that SOAPUI is URL encoding the endpoint, so the request ends up looking more like this:

<hidden_base_url>/resourcepath/abc$%C2%A312/morepath

 

Is it possible via groovy scripting to disable URL encoding for this test request?

1 Reply