Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 httppost 设置到我的服务器。现在我有模拟器的地址,但现在我想在线测试应用程序。这是代码:
HttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost("http://10.0.2.2/posloviPodaci/index.php");
如何为我在线的服务器设置地址?
我觉得我可能误解了这个问题,但是您是否只需要更改传递给 HttpPost 对象的 URL 以使其指向您的服务器?
我相信您只需要更改"http://10.0.2.2/posloviPodaci/index.php"为类似"http://your-site-name/posloviPodaci/index.php"或取决于您在服务器上托管index.php的方式。
"http://10.0.2.2/posloviPodaci/index.php"
"http://your-site-name/posloviPodaci/index.php"