add http1 with order headers

This commit is contained in:
bxd
2023-10-17 23:12:24 +08:00
parent f3f86d1722
commit de912c24b7
5 changed files with 98 additions and 13 deletions

View File

@@ -75,6 +75,27 @@ func main() {
log.Print(resp.StatusCode()) //return status code
}
```
## setting order headers with http1
```go
package main
import (
"log"
"github.com/gospider007/requests"
)
func main() {
resp, err := requests.Get(nil, "http://httpbin.org/anything", requests.RequestOption{
OrderHeaders: []string{"accept-encoding"}},
)
if err != nil {
log.Panic(err)
}
log.Print(resp.Text())
}
```
## send websocket
```go
package main