Go 1.7 added Context to the http.Request. Does it completely replace http.CloseNotify? Should I prefer that now, and not bother with CloseNotify?
相关问题
- Angular RxJS mergeMap types
- Google Apps Script: testing doPost() with cURL
- How to instantiate Http service in main.ts manuall
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- Golang mongodb aggregation
相关文章
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- Can I run a single test in a suite?
- How to check if a request was cancelled
- Is it possible to implement an interface with unex
- Is a unicode user agent legal inside an HTTP heade
- How to access value of first index of array in Go
- git: retry if http request failed
- Flutter - http.get fails on macos build target: Co
Yes, but only in Go 1.8+. The APIs existed in Go 1.7 but it wasn't until Go 1.8 that the client's disconnection caused the Request's Context to be Done, so in Go 1.7 there was still a valid use of CloseNotifier.
(Source: I added "context" to the standard library and am the author of the net/http package.)