You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
338 B

  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. }