1

我需要编写一个 Android 应用程序,它将通过这个应用程序请求一个 url,我需要传递一些数据来将它们存储在那个 url 中。

url 页面使用 Gethttp 从 http 请求中获取数据。

那么有什么想法可以将这些部分连接在一起吗?

4

1 回答 1

0

您可以像这样使用 QueryString:

http://www.mywebsite.com/service.php?Param1=5&Param2=teste

如果你使用字符串,你应该先编码。

"http://www.mywebsite.com/service.php?Param1=5&Param2=" + URLEncoder.encode("teste");
于 2012-02-26T18:39:55.760 回答