Expected Behavior
while calling the insomnia.sendRequest, expect to call the API with the details passed and retrun response in the after response script.
Actual Behavior
It is making the after script execute forever with out and end.
Reproduction Steps
- Open the API request
- Go to script tab
- Click on after response tab
- Script below is failing and making the after response script to execute for ever.
Example 1:
const resp = await
insomnia.sendRequest(
{
url: '',
method: 'POST',
headers: [
{ name: 'Content-Type', value: 'application/json' },
{ name: 'Authorization', value: authToken }
],
body: {
mimeType: 'application/json',
text: JSON.stringify(postData)
}
}
);
console.log('Pricing API response:', resp.statusCode, resp.body);
Example 2:
const resp = await new Promise((resolve, reject) => {
insomnia.sendRequest(
{
url: '',
method: 'POST',
headers: [
{ name: 'Content-Type', value: 'application/json' },
{ name: 'Authorization', value: authToken }
],
body: {
mimeType: 'application/json',
text: JSON.stringify(postData)
}
}, (err, resp) => {
if (err != null) {
reject(err);
} else {
resolve(resp);
}
}
)
});
Both of this didn't work.
Is there an existing issue for this?
Which sync method do you use?
Additional Information
No response
Insomnia Version
11.3.0
What operating system are you using?
macOS
Operating System Version
15.5
Installation method
downloaded dmg from insomnia site
Last Known Working Insomnia version
No response
Expected Behavior
while calling the insomnia.sendRequest, expect to call the API with the details passed and retrun response in the after response script.
Actual Behavior
It is making the after script execute forever with out and end.
Reproduction Steps
Example 1:
const resp = await
insomnia.sendRequest(
{
url: '',
method: 'POST',
headers: [
{ name: 'Content-Type', value: 'application/json' },
{ name: 'Authorization', value: authToken }
],
body: {
mimeType: 'application/json',
text: JSON.stringify(postData)
}
}
);
console.log('Pricing API response:', resp.statusCode, resp.body);
Example 2:
const resp = await new Promise((resolve, reject) => {
insomnia.sendRequest(
{
url: '',
method: 'POST',
headers: [
{ name: 'Content-Type', value: 'application/json' },
{ name: 'Authorization', value: authToken }
],
body: {
mimeType: 'application/json',
text: JSON.stringify(postData)
}
}, (err, resp) => {
if (err != null) {
reject(err);
} else {
resolve(resp);
}
}
)
});
Both of this didn't work.
Is there an existing issue for this?
Which sync method do you use?
Additional Information
No response
Insomnia Version
11.3.0
What operating system are you using?
macOS
Operating System Version
15.5
Installation method
downloaded dmg from insomnia site
Last Known Working Insomnia version
No response