curl icon indicating copy to clipboard operation
curl copied to clipboard

Response Headers

Open Degreane opened this issue 12 years ago • 2 comments

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

Degreane avatar Jan 20 '14 07:01 Degreane

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

christophwitzko avatar Aug 28 '14 12:08 christophwitzko

Sorry for my mistake. I've rewrite all code and the problem may be solved.

nareix avatar May 20 '15 07:05 nareix