Forum Discussion

AcharSa's avatar
AcharSa
Occasional Visitor
3 years ago

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.

  • ChrisAdams's avatar
    ChrisAdams
    Champion Level 3

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