REST Request - Add data to body of Request
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
Configuration
-
REST
-
Test Setup
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
https://apimate.eu
