Is timeout option implemented?
- Dominant language
- JavaScript
- Stars
- 953
- Forks
- 164
- PR merge metrics
- No merged PRs in 30d
Description
It could just be that I'm not understanding how to use options, but I also do not see timeouts implemented in the source.
Should this request timeout after 5 seconds? I have tried this and I do not get a timeout with version 0.5.0.
``` javascript
unirest
.post(`http://localhost/api`)
.headers(
{ 'x-test': "true",
'x-test-data': "55" }
)
.attach({
'file': './path/file.jpg'
})
.timeout(5000)
.end((response) => {
if (!response.ok) {
throw new Error('failed to upload file')
}
})
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the JavaScript example against the local upload endpoint and then trace how the .timeout(5000) option is handled. Check whether the request aborts after five seconds; done means the behavior matches the documented timeout semantics, with a focused test or documentation update if the option is unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100