req
req copied to clipboard
request stuck
Hello.
client := req.NewClient()
client.EnableTraceAll()
client.ImpersonateFirefox()
client.EnableDumpAllWithoutResponseBody()
client.EnableInsecureSkipVerify()
client.DisableAutoReadResponse()
client.DisableAutoDecode()
ctx, cancel := context.WithTimeout(context.Background(), 5* time.Second)
go func() {
time.Sleep(3*time.Second)
cancel()
println("context canceled")
}()
log.Fatalln(client.R().SetContext(ctx).Get("https://ballwatch.com/global/ru/collections/detail/1265.html"))
Log:
:method: GET
:path: /global/ru/collections/detail/1265.html
:authority: ballwatch.com
:scheme: https
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
accept-language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
accept-encoding: gzip
upgrade-insecure-requests: 1
sec-fetch-dest: document
sec-fetch-mode: navigate
sec-fetch-site: same-origin
sec-fetch-user: ?1
:status: 106
server: nginx/1.14.1
date: Mon, 01 Jul 2024 10:02:54 GMT
content-type: text/html; charset=UTF-8
x-powered-by: PHP/5.6.40
set-cookie: 9a20dd8343d93c497b82fa69424ff0d2=1pjbl3nhtsab43grthnll36bs7; path=/; HttpOnly
p3p: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
cache-control: no-cache
pragma: no-cache
context canceled
context canceled but log.Fataln not invoked.
default http.Client just return error