blog-service
blog-service copied to clipboard
请问有人知道书上2.9.5统一超时控制是怎么验证的吗?
我是在get tags里面返回response之前,加上了一个time.Sleep(10 * time.Second) ,然后在yaml里面设置的时间是1s,但是没有生效啊
书上125页给的代码:
_,err := ctxhttp.Get(c.Request.Context(),http.DefaultClient,"https://www.google.com/")
这里的ctxhttp又是哪来的呢???