TimeoutHandler
- Dominant language
- Go
- Stars
- 25.6k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
@kataras hi, is there a way to do in `iris` like this in `net/http`?
```golang
func TimeoutHandler(duration time.Duration) func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
if duration > 0 {
return http.TimeoutHandler(next, duration, reason)
}
return next
}
}
i want to set a http timeout, and get `503` code
```
_Originally posted by @sado0823 in https://github.com/kataras/iris/issues/1668#issuecomment-814874372_
Contributor guide
Research direction
No Iris file or test is named. Start by reviewing the framework's HTTP middleware support and the referenced net/http.TimeoutHandler behavior; done should establish whether Iris can apply a request timeout and return HTTP 503, with the behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100