java - 在 Android 设备上使用 HTTP Post 将数据放在 google app engine blobstore

标签 java android http post blobstore

我正在尝试将数据发布到谷歌应用引擎上的 Blob Store,此代码运行时不会抛出任何异常,但在 blobstore 端,发布请求根本没有日志。当我使用表单(尽管有 mime 数据)发布时,服务器端的东西起作用了。我已经允许我的 android 应用程序使用互联网。这是在黑暗中刺伤,但如果你们中的任何人之前可能遇到过这样的问题,也许我遇到的问题可能会敲响警钟!

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);
 }

最佳答案

您可以尝试拦截模拟器和服务器之间的流量,即使用 WireShark 来查看服务器是否完全响应您的请求。 你的代码看起来很适合我。

关于java - 在 Android 设备上使用 HTTP Post 将数据放在 google app engine blobstore,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4177252/

相关文章:

c# - 在 C# 中请求网页欺骗主机

android - Cookie 不存储在 android Webview API 21 及更高版本中

java - JADE_mulli代理系统

java - 如何用一个泛型构造函数替换两个 Java 构造函数

java - java中的排序点(2d,3d等)

java - Android运行时错误: error opening trace file: No such file or directory (2)

java - ListView 滚动时不会保留 Edittext 的内容

Android - 人脸特征检测

ios - 我仅在 iPhone 中得到延迟的 Ionic native http 响应

javascript - 在 JavaScript 中读取 TIFF 文件的响应