Forum Discussion
Having read through some further ReadyAPI Documentation, I see that the text area below the Media Type (application/json) dropdown is called the "Content Editor".
Is this where the json request body arguments should be set? I.e. rather than as request parameters under the Parameter editor?
HEADERS = {'apitoken': XXXX}
resp = requests.post(
url= 'https://xxxx.xxxxxxx.com/rest/xxxx/search'
data={'name': nameArg, 'country': countryArg},
headers=HEADERS
)
I.e. for the JSON example I am trying to simulate/test (above) in ReadyAPI, should I be entering the following under the "Content Editor", instead of adding them as request parameters?
{'name': NameArg, 'country': CountryArg}
"is this where the json request body arguments should be set?"
Yes - at least that's how it works for me. [ edited] - for clarity for any POST method that has a lot of name/value pairs I use the JSON form for clarity and ease and use that editor window below "Media Type" to put my JSON. I don't do headers in that space.
Related Content
- 5 years agoSiKing
- 10 years agochuddy12345