Forum Discussion

madhanbasket's avatar
madhanbasket
Occasional Visitor
9 years ago

REST Post Method changed to GET automatically when certain parameters are empty or null

I am using SOAP UI NG Trial Version

 

When I Submit Request for POST method with empty or null parameters, then the request is submitted as GET method.

 

Example: https://localhost:8443/postdata

Params:

Firstname : empty / null

Lastname : empty / null\

address1 : empty / null\

address2 : empty / null\

city  : empty / null\

stateselect : empty / null\

zipcode : empty / null\

birthdatemonth : empty / null\

birthdateday : empty / null\

birthdateyear : empty / null\

gender : empty / null\

emailaddress : empty / null\

client_id : skldhflkafkla

state : test

 

PostChangedToGet.jpg

 

Is there anything I am doing wrong or is it bug in SOAP UI NG Pro, the same SOAP UI project works in SOAP UI Free version.

 

Please let me know your inputs

  • iano's avatar
    iano
    9 years ago

    Here's the reply from Support

     

    Hello,
    
    Under the Project tab configure the request as a POST instead of a GET. When you pass Sample requests into a testcase they still take the config from their parent in the projects tab.
    
    Regards,
    Temil

    But I already have the request on POST Method on the Project tab, but it still does a GET Method on the Raw Request.

    After looking further on my Project, the POST Method Request will have a redirect response.

    By default the Request Properties will have Follow Redirects = true

     

    I changed that property to false, and VOILA! it changes into Post.

    Please see screenshot below

    screenshot_01152016.jpg

     

    I don't really have a clear answer on this but I guess on my project, if the POST Request will respond into a redirect, I just have to set the Follow Redirects to false to ensure that the request will do a Post.

     

    I don't know if this really helps, but these solves my problem

     

  • nmrao's avatar
    nmrao
    Champion Level 3
    If I understand it right, it might be of some kind fault.
    You can easily verify this by doing:
    1. save the project in soapui free version
    2. remove it (by right click on project) from work space.
    3. start readyapi
    4. import the project saved in above
    5. run the test, see if that is going fine.
    If so, in correct method was selected earlier in readyapi while you noticed this issue.
  • iano's avatar
    iano
    New Contributor

    I want to bump this post because I have the same issue where I have a Post Method but it was being set to Get

    I am using licensed Ready API. Is this a bug on ReadyApi?

     

    the Post Method redirects the user to /home

    But I don't know why it changes to Get

     

    Please see screenshot

    screenshot_01132016.jpg

     

     

    • TanyaYatskovska's avatar
      TanyaYatskovska
      SmartBear Alumni (Retired)

      Hi Guys,

       

      This sounds like an issue in Ready! API 1.5. iano, are you using Ready! API 1.5.0 as well?

      I recommend that you submit this behavior to our Ready! API Support Team so that they could investigate it. You can do this by filling in the following Contact Support form: https://support.smartbear.com/product-list/