Answer the question
In order to leave comments, you need to log in
How to pass user in header via http.Client.Do() in golang?
I need to repeat the curl request via http.client.Do()
In the curl, I use the -u user:password key.
In golang, via header.Add, I could not repeat this. The request returned an authentication error.
Can you please tell me how to correctly pass user:password to the request?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question