(Untitled)
const response = pm.response.json();
const postRequest = {
url: 'http://localhost:3000/write?filename=foo.json',
method: 'POST',
header: {
'Content-Type': 'application/json',
'X-Foo': 'bar'
},
body: {
mode: 'raw',
raw: JSON.stringify(response),
}
};
pm.sendRequest(postRequest, (error, response) => {
console.log(error ? error : response.json());
});