Ask a Question

ReadyAPI GET with Body

SOLVED
anrobinson01
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?

 

10 REPLIES 10
richie
Community Hero

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
nmrao
Champion Level 2

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.
sonya_m
SmartBear Alumni (Retired)

Awesome advice, thank you!

 

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


Sonya Mihaljova
Community and Education Specialist

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. ⬇️⬇️⬇️
sonya_m
SmartBear Alumni (Retired)

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


Sonya Mihaljova
Community and Education Specialist

nmrao
Champion Level 2

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


Regards,
Rao.

@MarcusJ :

 

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

 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

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. ⬇️⬇️⬇️

@MarcusJ : Thanks for the update 👍 

 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
cancel
Showing results for 
Search instead for 
Did you mean: