【发布时间】:2013-11-29 23:07:03
【问题描述】:
我正在尝试将数据提交到 Google 表单,特别是 this form here。这是我试图用来提交到表单的代码。代码执行得很好,但我从未在表单中看到任何数据。此外,该帖子始终返回状态代码 200(稍后在代码中检查)。有什么想法我在这里做错了吗?谢谢!
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("https://docs.google.com/forms/d/1EqlHV7Khlb-eONO0ffa_bXEMDcvIzXObt72pnydfW0o/formResponse");
List<BasicNameValuePair> results = new ArrayList<BasicNameValuePair>();
results.add(new BasicNameValuePair("entry.1840528687",gridSquare));
results.add(new BasicNameValuePair("entry.406732602",sourceDb));
results.add(new BasicNameValuePair("entry.369248655",errorType));
results.add(new BasicNameValuePair("entry_331766136",paidUserString));
results.add(new BasicNameValuePair("entry.240391797",version));
results.add(new BasicNameValuePair("draftResponse","[]\n"));
results.add(new BasicNameValuePair("pageHistory","0"));
results.add(new BasicNameValuePair("fbzx","1608817002751623479"));
post.setEntity(new UrlEncodedFormEntity(results));
HttpResponse response=client.execute(post);
【问题讨论】:
标签: android google-forms