Forum Discussion

ArunS's avatar
ArunS
Occasional Contributor
6 years ago

Passing payload to GET request

Hi All, There is one GET request which is accepting JSON as payload, tried to pass payload to GET request in SOAPUI but couldn't get text box to send payload. If anyone knows how to pass payload to GET request in SOAPUI, please help me.
  • Check with your team if it was a mistake or defect. If you are passing payload, then it should be a POST method.
  • Yeah rao's right...http rules (check out w3.org or similar) define a GET as a data retrieval based on parameters included in the URI and query string and so shouldn't include a payload.

    I have worked on a project when a POST method was misused for data retrieval (i.e. instead of using a GET method) and i have worked on a project when a GET did include a payload...., but both these were due to devs not knowing what they're doing and no code reviews in place and got them sorted once i'd raised defects on them.
    If you consider most REST clients, they don't even include the facility to submit a payload in a GET request.

    I'd double check the technical requirements and if they are misusing an http method, i'd go back to the devs and point them to any solution or technical architect....they would never allow this.

    Cheers,

    richie
  • nmrao's avatar
    nmrao
    Champion Level 3
    Check with your team if it was a mistake or defect. If you are passing payload, then it should be a POST method.
    • richie's avatar
      richie
      Community Hero
      Yeah rao's right...http rules (check out w3.org or similar) define a GET as a data retrieval based on parameters included in the URI and query string and so shouldn't include a payload.

      I have worked on a project when a POST method was misused for data retrieval (i.e. instead of using a GET method) and i have worked on a project when a GET did include a payload...., but both these were due to devs not knowing what they're doing and no code reviews in place and got them sorted once i'd raised defects on them.
      If you consider most REST clients, they don't even include the facility to submit a payload in a GET request.

      I'd double check the technical requirements and if they are misusing an http method, i'd go back to the devs and point them to any solution or technical architect....they would never allow this.

      Cheers,

      richie
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi ArunS,

    Do the suggestions give here help you find the answer to your question? Please share your solution with us.

    • ArunS's avatar
      ArunS
      Occasional Contributor

      richie  nmrao TanyaYatskovska , I understood that passing payload to GET method is not a good practice.

       

      But Postman tool does support passing payload to GET method.

      Can we raise this as new feature request for ReadyAPI product....??

       

      Please help on this....