I am trying to set up a DELETE call, but to do this I first need to create the data to delete so I am trying to call a POST in the pre-request. I have run the POST as a normal request and it works fine, but inside the pre-request it just seems to be getting ignored. I know this because I can alter the URL to something that should not work and it makes no difference and raises no errors.
This is what I have in my pre-request: -
pm.sendRequest({
url: "http://someurl/test",
method: 'POST',
header: {
'Authorization': 'Basic Tmlfefe89899eI='
},
body: {
"ClientId": 594,
"Name": null,
"Disabled": false
}, function (err, res) {
console.log(res);
}
});
Is there anything special I have to do to use a POST as a pre-request? Any help would be greatly appreciated.