mirror of
https://github.com/gospider007/requests.git
synced 2025-12-24 13:57:52 +08:00
sync
This commit is contained in:
@@ -45,6 +45,7 @@ Requests is a fully featured HTTP client library for Golang. Network requests ca
|
||||
* [Fingerprint](https://github.com/gospider007/requests/tree/master/test/fingerprint)
|
||||
* [Ja3 Fingerprint](https://github.com/gospider007/requests/blob/master/test/fingerprint/ja3_test.go)
|
||||
* [Http2 Fingerprint](https://github.com/gospider007/requests/blob/master/test/fingerprint/http2_test.go)
|
||||
* [Quic Fingerprint](https://github.com/gospider007/requests/blob/master/test/fingerprint/quic_test.go)
|
||||
* [Ja4 Fingerprint](https://github.com/gospider007/requests/blob/master/test/fingerprint/ja4_test.go)
|
||||
* [Session](https://github.com/gospider007/requests/blob/master/test/session_test.go)
|
||||
* [IPv4, IPv6 Address Control Parsing](https://github.com/gospider007/requests/blob/master/test/addType_test.go)
|
||||
|
||||
30
test/fingerprint/quic_test.go
Normal file
30
test/fingerprint/quic_test.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/gospider007/requests"
|
||||
)
|
||||
|
||||
func TestHttp3(t *testing.T) {
|
||||
resp, err := requests.Get(context.TODO(), "https://cloudflare-quic.com/", requests.RequestOption{
|
||||
H3: true,
|
||||
Ja3: true,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
log.Print(resp.Proto())
|
||||
if resp.StatusCode() != 200 {
|
||||
t.Error("resp.StatusCode!= 200")
|
||||
}
|
||||
if resp.Proto() != "HTTP/3.0" {
|
||||
t.Error("resp.Proto!= HTTP/3.0")
|
||||
}
|
||||
}
|
||||
|
||||
// [0 87 164 1 116 253 33 138 106 82]
|
||||
// [0 87 162 31 139 8 0 0 0 0]
|
||||
Reference in New Issue
Block a user