Writing API Response to Json File using Rest Assured

During API Automation there be a scenario were json response has to be stored so that it can be used as a input to other API request

Or

If we want to write the REST API Response to Json File in case if the response has to be debugged

Or

If the UI Framework is integrated with Rest Assured API Framework then we can make the rest call once and store the response in JSON file so that it can be used against UI Validation

Required Dependencies

Here i have used Rest Assured

You may also like...