Ask a Question

REST Request - Add data to body of Request

AcharSa
Occasional Visitor

REST Request - Add data to body of Request

Hi there,

I'm trying to setup a REST Request Test Case for a POST endpoint where I'm sending json body of the Http Request. Looking at the documentation for REST parameter types, (https://support.smartbear.com/readyapi/docs/requests/rest/types.html), I don't see a type that corresponds to the body of the request. Am I missing something? It seems like a fairly common usecase but I'm not quite sure how to set up the Request or the Data source to fit that.

Any help would be greatly appreciated. I'm a dev that came across this tool looking for a way to make it easier/faster to do testing on my endpoints.

2 REPLIES 2
ChrisAdams
Community Leader

Hi,

Once you have set the request type to post, click on the request tab.  There should be a panel at the bottom with the header media type.  You should then see 'application/json' in the dropdown.  Select that and past your json into the empty panel below...

ChrisAdams_0-1663332255055.png

 

KarelHusa
Regular Contributor

@AcharSa,

sending the REST request body is pretty straightforward, though sometimes not easy to find for the first time.

 

Check the REST request documentation; see Specify request body paragraph.

 

Best regards,

Karel

 

Karel@apimate.eu
https://apimate.eu
cancel
Showing results for 
Search instead for 
Did you mean: