blog-service icon indicating copy to clipboard operation
blog-service copied to clipboard

请问有人知道书上2.9.5统一超时控制是怎么验证的吗?

Open moo611 opened this issue 3 years ago • 1 comments

我是在get tags里面返回response之前,加上了一个time.Sleep(10 * time.Second) ,然后在yaml里面设置的时间是1s,但是没有生效啊

moo611 avatar Dec 25 '21 06:12 moo611

书上125页给的代码: _,err := ctxhttp.Get(c.Request.Context(),http.DefaultClient,"https://www.google.com/") 这里的ctxhttp又是哪来的呢???

moo611 avatar Dec 25 '21 06:12 moo611