Ask a Question

Write Rest request content to file


Write Rest request content to file

Hi there,

I'm randomly generating  the content of a rest put request which I execute several times after another (everytime with new content). Afterwards I'd like to check whether the content was written as expected but since I can't access the put request as a reference anymore I thought about writing the content to file every time and than use that file as a reference for the later check.

Here's an example of how the request looks like in ReadyApi


Problem now is: I don't know how I could write this into a file. Any suggestions? 





Community Leader

As mentioned elsewhere, you might want to look at the datasink step

Community Hero

Hey @LennSar 

As always i'm a bit lost on what you want (the problem is me, not you!), but
if i understand correctly, as @ChrisAdams said you can use the DataSink to write out you want the responses? The way i read your post, it seemed like you wanted the input payloads for later comparison?
Then i changed my mind after re-reading and then thought you wanted to confirm the sequential PUTs updated the endpoints database correctly. If you want to verify a CRUD transaction, i always follow up with a GET to retrieve the updated detail to assert the changes were made successfully and if there isn't a GET method available i use a JDBC step to do the same.

Still unsure what youre after or if any of my comments are relevant!😉



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
Showing results for 
Search instead for 
Did you mean: