thank for you example 在 2013年8月8日星期四 UTC+8上午6:46:35,Christoph Hack写道: > > I think it's possible to simply use the PostForm method with a url like " > http://user:p...@example.com" (but I haven't tried it). Anyway, if you > want to create a request object on your own, you can do so: > > data := url.Values{ ... values ... } > req := http.NewRequest("POST", "URL", strings.NewReader(data.Encode())) > req.Header.Set("Content-Type", "application/x-www-form-urlencoded") > req.SetBasicAuth('u', 'p') > client.Do(req) > > Regards, > Christoph >
-- 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. For more options, visit https://groups.google.com/d/optout.