Kong / Kong/unirest-nodejs

Calling a service with no return body do not executes end()

Open
#82 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
953
Forks
164
PR merge metrics
No merged PRs in 30d

Description

Hi. Given an API for deleting objects, it returns `202 Accepted` and no content in the body.

When using unirest for calling it this way:

```
unirest
.post("/deleteByIds")
.headers({
"Content-Type": "application/json"
})
.send(ids)
.end(function (res) {
//code handling - never called
});
}
```

The `end()` function is never called back, however the service has already responded 202 with no body. Tested using `unirest-nodejs` version `0.4.2`.

Could this be related to PR #74 ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the request chain's .end() callback handling in unirest-nodejs and compare the behavior with PR #74. Reproduce the 202 Accepted response with no body, then verify that the callback is invoked and the response is handled correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.