cancel
Showing results for 
Search instead for 
Did you mean: 

ReadyAPI GET with Body

SOLVED
Highlighted
Occasional Visitor

ReadyAPI GET with Body

I'm trying to use ReadyAPI to submit a GET with a Body.  It appears from what I read that it is not supported.  Is there some workaround for this and will ReadyAPI ever support it?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: ReadyAPI GET with Body

Hi,

 

To add a request body to a GET request please add the below to the ReadyAPI install/bin/ReadyAPI.vmoptions file and restart ReadyAPI.  

 

-Dallow.get.request.body=true

 

There should be a request body text area for GET requests after doing this.

 

Regards,

Marcus James

SmartBear Support



Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

10 REPLIES 10
Highlighted
Community Hero

Re: ReadyAPI GET with Body

Hey @anrobinson01,

Yep youre right.....the current ReadyAPI! functionality doesnt include the ability to submit a GET request with a body because this essentially breaks the "rules" that are defined for http requests.

I cant remember the specific RFC numbers that describe http/http methods but theyre pretty clear.....an http request with a GET method does NOT include a payload (a body).

You could submit a new feature request to get this included in some time in the future in ReadyAPI! but i doubt this would ever be included in a future release cos GETs arent supposed to have a payload.

I am assuming your GET request Reads data as opposed to creating/updating data? (like an SQL's SELECT data retrieval).

Strictly speaking you could raise a defect on the interface design spec (the requirement that defines the API youre talking about), so that the erroneous requirement is updated to comply with RFC standards which would then require the code to be fixed. Either changing the method to maybe a POST method which supports a request payload or change the API so the the parameters you are currently defining in the request payload is instead handled by REST parameters on your request (most likely query parameters).

Ta

Rich

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 Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Community Hero

Re: ReadyAPI GET with Body

You should be able to achieve using groovy script and with light weight groovy-wslite library.
Please refer below link and there are samples as well.
https://github.com/jwagenleitner/groovy-wslite#rest


Regards,
Rao.
Highlighted
Community Manager

Re: ReadyAPI GET with Body

Awesome advice, thank you!

 

@anrobinson01 how did you solve this? Please mark the best answer as a solution!


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Moderator

Re: ReadyAPI GET with Body

Hi,

 

To add a request body to a GET request please add the below to the ReadyAPI install/bin/ReadyAPI.vmoptions file and restart ReadyAPI.  

 

-Dallow.get.request.body=true

 

There should be a request body text area for GET requests after doing this.

 

Regards,

Marcus James

SmartBear Support



Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

Highlighted
Community Manager

Re: ReadyAPI GET with Body

@anrobinson01 please let the Community know if the advice helped🙂


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Community Hero

Re: ReadyAPI GET with Body

Does it work for Free edition as well? or just limited to Pro?


Regards,
Rao.
Highlighted
Community Leader

Re: ReadyAPI GET with Body

@MarcusJ :

 

Same Question can we achieve this functionality in SoapUI OS as well, please respond 🙂

 


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
Moderator

Re: ReadyAPI GET with Body

Hi,

 

The functionality is not available in SoapUI open source, it is currently only in ReadyAPI.

 

 

Regards,

Marcus James

SmartBear Support

 



Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Community Leader

Re: ReadyAPI GET with Body

@MarcusJ : Thanks for the update 👍 

 


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
The new challenge is here!

Create a script to сhange an XPath Match assertion to a JSONPath Match assertion for the TechCorner tag!


Scripts created in July:
- A script to generate an email when an assertion fails
- A script to change the request body before sending it to the server
Top Kudoed Authors