Skip to content

Response Saving

JetBrains introduced the >> operator for saving response bodies to files:

GET https://api.example.com/data
>> ./responses/data.json

>> creates a new file, appending a numeric suffix (e.g., -1, -2) if the file already exists. >>! overwrites the file if it exists.

JetBrainshttpyackulala

The >> syntax can be combined with response handler scripts. Variables can be used in paths.

VS Code REST Client provides UI-based save buttons instead of in-file syntax.

JetBrains

JetBrains supports a <> response reference for comparing the current response against a previously saved response file:

GET https://api.example.com/data
<> ./expected-response.json

This is unique to JetBrains.