When I use go-ntlmssp I get error 401. Try use curl curl --ntlm -u: url, 
get 200

среда, 23 октября 2019 г., 9:11:23 UTC+3 пользователь Skip написал:
>
> Googling for "NTLM http go client", the first result looks legit:
>
> https://github.com/Azure/go-ntlmssp
>
>
> On Tue, Oct 22, 2019 at 10:20 PM <shirok...@gmail.com <javascript:>> 
> wrote:
>
>> I'm trying emulate browser, open intranet url and get status code 401. 
>> How to open url with NTLM auth or login, pass? Thanks
>>
>> package main
>> import (
>>     "gopkg.in/headzoo/surf.v1"
>>         "fmt")
>>
>> func main() {
>>     bow := surf.NewBrowser()
>>     bow.AddRequestHeader("Accept", "text/html")
>>     bow.AddRequestHeader("Accept-Charset", "utf8")
>>     err := bow.Open(url)
>>     if err != nil {
>>         panic(err)
>>     }
>>
>>     fmt.Println(bow.StatusCode())}
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golan...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/faaa1b45-7516-447c-8397-fa9c16cc549c%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/golang-nuts/faaa1b45-7516-447c-8397-fa9c16cc549c%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/778568c7-a746-41c3-be8b-386d5a91239c%40googlegroups.com.

Reply via email to