We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d16221 commit 0918c32Copy full SHA for 0918c32
pkg/requests/request.go
@@ -4,6 +4,7 @@ import (
4
"bytes"
5
"crypto/tls"
6
"errors"
7
+ "fmt"
8
"github.com/bufsnake/httpx/config"
9
"github.com/bufsnake/httpx/pkg/log"
10
"github.com/bufsnake/httpx/pkg/useragent"
@@ -92,6 +93,9 @@ func (r *request) Run() error {
92
93
return err
94
}
95
defer do.Body.Close()
96
+ if do.StatusCode == 101 {
97
+ return fmt.Errorf("%s status is %s", req.URL, do.Status)
98
+ }
99
resp, err := httputil.DumpResponse(do, true)
100
if err != nil {
101
0 commit comments