Forum Discussion

llamontagne's avatar
llamontagne
New Contributor
16 years ago

REST request does not contain parameter if value is an empty string

I am running soapUI pro 3.0 to test a REST service.  I am using data driven testing to test this service.  If I try to set one of the parameters to an empty string, soapUI removes the parameter from the request even though 'Remove Empty Content' is set to false on the request.

Inititially I was setting this field with a property ${req_id}, so then I tried just leaving it blank, but I still got the same results

When I look at the "raw" http request in the viewer, the parameter 'req_id' is not in the request string.

2 Replies

  • Hello,

    If you set the parameter to be required, it will be included even when the value is empty. You can do this by opening the Method or Resource (depending on where the property is defined), selecting the parameter in the Method/Resource Parameters panel, and checking the "Required" checkbox.

    Regards,
    Dain
    eviware.com
  • MarianL's avatar
    MarianL
    New Contributor
    Hello,

    yes, but I set the parameter to be required then request contains the parameter with "=" sign. Which is not acceptable for me.

    Regards,

    Marian