cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved] Pass empty string to query parameter

SOLVED
Highlighted
Occasional Contributor

[Resolved] Pass empty string to query parameter

I would like to know how i could pass an empty string to a parameter at the end of the url:

Example:

localhost:8080/myurl/cluster?name=

Thank you,

Peter
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: [Resolved] Re: Pass empty string to query parameter

You need to set the query parameter as required and leave the parameter value empty. Please see the screenshot:

chrome_2020-04-10_12-39-26.png


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

8 REPLIES 8
Highlighted
Community Expert

Re: Pass empty string to query parameter

You could try one of the following:

localhost:8080/myurl/cluster?name=%00
localhost:8080/myurl/cluster?name=%81

or something else from the list here http://www.w3schools.com/tags/ref_urlencode.asp
Highlighted
Occasional Contributor

Re: Pass empty string to query parameter

Thank you for the reply,

I would like to send a REST call using SOAPUI 4.5.1, but how would I be able to assign the name parameter in the soapui to have an empty string. When I enter %00 or %81 the url does not generate an empty string

When I try to assign the name parameter through the SOAPUI it does not return.


My apologies for not being clear in my original post.
Highlighted
Community Expert

Re: Pass empty string to query parameter

pford90 wrote:
When I enter %00 or %81 the url does not generate an empty string

What does it generate? Do you have URL-Encoding disabled?
Highlighted
Occasional Contributor

Re: Pass empty string to query parameter

This is the url that soap generates
/cluster?name=%2500 - %00

/cluster?name=%2581 - %81

And no the Disable Encoding: of the resource method is not checked
Highlighted
Community Expert

Re: Pass empty string to query parameter

pford90 wrote:
And no the Disable Encoding: of the resource method is not checked

So you should check that and try again.
Highlighted
Occasional Contributor

[Resolved] Re: Pass empty string to query parameter

Hey SiKing,

Thank you, it worked! Hope you have a happy holidays, and thank you for you're assistance and being so patient.
Highlighted
New Contributor

Re: [Resolved] Re: Pass empty string to query parameter

Hi,

 

How did you get this working? Where can i find the option to disable encoding of the resource method.

 

i have 3 parameters request,name and code and i want to send empty for code.

 

i tried %00 but, this is converted as %2500 

 

Can you please help.

 

 

Highlighted
Moderator

Re: [Resolved] Re: Pass empty string to query parameter

You need to set the query parameter as required and leave the parameter value empty. Please see the screenshot:

chrome_2020-04-10_12-39-26.png


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors