http_util_test.go 338 B

12345678910111213141516171819
  1. package util
  2. import (
  3. "testing"
  4. "github.com/valyala/fasthttp"
  5. )
  6. func TestFasthttpClientHead(t *testing.T) {
  7. err := Head("https://www.google.com", func(header *fasthttp.ResponseHeader) {
  8. header.VisitAll(func(key, value []byte) {
  9. println(string(key) + ": " + string(value))
  10. })
  11. })
  12. if err != nil {
  13. println(err.Error())
  14. }
  15. }