cancel
Showing results for 
Search instead for 
Did you mean: 

Passing payload to GET request

SOLVED
New Contributor

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.
2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Hero

Re: Passing payload to GET request

Check with your team if it was a mistake or defect. If you are passing payload, then it should be a POST method.


Regards,
Rao.
Community Hero

Re: Passing payload to GET request

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
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
4 REPLIES 4
Community Hero

Re: Passing payload to GET request

Check with your team if it was a mistake or defect. If you are passing payload, then it should be a POST method.


Regards,
Rao.
Community Hero

Re: Passing payload to GET request

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
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
Community Manager

Re: Passing payload to GET request

Hi @ArunS,

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

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Contributor

Re: Passing payload to GET request

@richie  @nmrao @TanyaGorbunova , 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....

New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors