2
我试图将数据发布到谷歌的应用引擎上的Blob商店,该代码运行时没有抛出任何异常,但在Blobstore端没有完全登录帖子请求。服务器端的东西工作时,我张贴使用表单(尽管与哑剧数据)。我已允许我的Android应用程序使用互联网。这是在黑暗中刺,但如果你们中的任何一个人可能有这样的问题之前,也许我遇到的问题可能会响起一个钟!在Android设备上使用HTTP Post将数据放在Google应用引擎的Blob商店
public void sendVideo() throws IOException {
// Create a new HttpClient and Post Header
HttpClient httpclient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost("http://www.theurliampostingto.com/au813rsadjfaruh);
// Add your data
List<NameValuePair> pairs = new ArrayList<NameValuePair>();
pairs.add(new BasicNameValuePair("key1", "value1"));
pairs.add(new BasicNameValuePair("key2", "value2"));
httpPost.setEntity(new UrlEncodedFormEntity(pairs));
// Execute HTTP Post Request
HttpResponse response = httpclient.execute(httpPost);
}
是您的名称 - 值对列表中的关键字是否正确(区分大小写,..),并且该列表包含满足请求的所有参数? – rekaszeru 2011-04-12 07:04:45