Forum Discussion

pford90's avatar
pford90
Occasional Contributor
11 years ago

[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
  • You need to set the query parameter as required and leave the parameter value empty. Please see the screenshot:

  • pford90's avatar
    pford90
    Occasional Contributor
    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.
  • SiKing's avatar
    SiKing
    Community Expert
    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?
  • pford90's avatar
    pford90
    Occasional Contributor
    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
  • SiKing's avatar
    SiKing
    Community Expert
    pford90 wrote:
    And no the Disable Encoding: of the resource method is not checked

    So you should check that and try again.
  • pford90's avatar
    pford90
    Occasional Contributor
    Hey SiKing,

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

      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.

       

       

      • Nastya_Khovrina's avatar
        Nastya_Khovrina
        SmartBear Alumni (Retired)

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