curl
curl copied to clipboard
Response Headers
Greetings. Can You Enable a function to return the Response Headers in a Header Structure ? It Is Important some times to get the Response Headers retrieved from the site/file being retrieved .
Much Regards
hi @Degreane, this repository seems inactive. I have created a fork with a lot of fixes and improvements: https://github.com/christophwitzko/go-curl
With this updated version you can easily access the response header:
import (
"fmt"
"github.com/christophwitzko/go-curl"
)
err, str, resp := curl.String("http://google.com")
fmt.Println(resp.Header.Get("Server"))
kind regards Christoph
Sorry for my mistake. I've rewrite all code and the problem may be solved.