【发布时间】:2016-02-25 05:32:36
【问题描述】:
我正在尝试通过 POST 自动填写 Google 表单。但是,当我实际向其发布数据时,实际上只有第一页的问题会被填写。
示例代码:
private static void PostToFormTest()
{
WebClient client = new WebClient();
var keyValue = new NameValueCollection();
keyValue.Add("entry.843521592", "Option 1");
keyValue.Add("entry.901429584", "Test Right Now");
keyValue.Add("entry.347619935", "Test Page 2");
Uri uri = new Uri("https://docs.google.com/forms/d/1zuQxyoRUQ-jYwTf7wrPu9Wqln8ec7gfhzRbOILD3LGU/formResponse");
byte[] response = client.UploadValues(uri, "POST", keyValue);
string result = Encoding.UTF8.GetString(response);
}
回复表:
https://docs.google.com/spreadsheets/d/1B4OSjQRQ37Q5Dt4mxMAx0wx5LfyajvWf_5rCY4lOvBU/edit?usp=sharing
表格:
https://docs.google.com/forms/d/1zuQxyoRUQ-jYwTf7wrPu9Wqln8ec7gfhzRbOILD3LGU/viewform
【问题讨论】:
标签: c# post google-forms