diff --git a/README.md b/README.md index 14e31c9..1cfbeac 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,12 @@

-
+

## A request library designed specifically for web crawlers +

-
- -## Requests is a fully featured HTTP client library for Golang. Network requests can be completed with just a few lines of code. Unified support for http1, http2, http3, websocket, sse protocols +## Requests is a fully featured HTTP client library for Golang. Network requests can be completed with just a few lines of code. Unified support for http1, http2, http3, websocket, sse, utls, uquic --- ## Innovative Features @@ -29,7 +28,7 @@ | HTTP/3 fingerprint spoofing protection | Not supported | | Arbitrary closure of underlying connections | Not supported | | Genuine request-level proxy settings | Not supported | -| Unique transport layer management mechanism, fully unifying HTTP/1, HTTP/2, HTTP/3, WebSocket, and SSE protocol handling | Not supported | +| Unique transport layer management mechanism, fully unifying HTTP/1, HTTP/2, HTTP/3, WebSocket, SSE, UTLS, QUIC protocol handling | Not supported | ## Features * [Simple for settings and Request](https://github.com/gospider007/requests#quickly-send-requests) diff --git a/requests.go b/requests.go index 7fcdf64..0166f78 100644 --- a/requests.go +++ b/requests.go @@ -146,6 +146,11 @@ func (obj *Client) Request(ctx context.Context, method string, href string, opti } } for ; optionBak.MaxRetries >= 0; optionBak.MaxRetries-- { + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + } option := optionBak option.Url = cloneUrl(uhref) response = NewResponse(ctx, option)