【发布时间】:2014-08-02 05:50:26
【问题描述】:
此代码适用于常规 Go 代码。
cookieJar, err := cookiejar.New(nil)
// error handling
client := &http.Client{Jar: cookieJar}
// authenticate request
authUrl := "https://some_secure_site"
values := make(url.Values)
values.Set("login_email", "email")
values.Set("login_password", "password")
resp, err := client.PostForm(authUrl, values)
// handle error
// process resp
我需要使用 Go 在 App Engine 中做类似的事情。 App Engine 使用 urlfetch 包而不是 http 包。
如何使用 urlfetch 包来做到这一点?
【问题讨论】:
标签: google-app-engine cookies https go