i have used package like github.com/Azure/go-ntlmssp to authenticate to sharepoint 2010.
url, username, password := "http://www.some-website.com", "admin", "12345"
client := &http.Client{
Transport: ntlmssp.Negotiator{
RoundTripper:&http.Transport{},
},
}
req, _ := http.NewRequest("GET", url, nil)
req.SetBasicAuth(username, password)
res, _ := client.Do(req)
in response i am getting 401 Unauthorized Now here the wierd thing is sometimes(after many trials and not consistent after that also) the authentication happens successfully. And when the authentication fails in response header i can see Www-Authenticate:[NTLM]. Please suggest
</div>