【问题标题】:call webservice using httppost method in android with parameter在带有参数的android中使用httppost方法调用webservice
【发布时间】:2011-11-17 06:44:12
【问题描述】:

我想使用Http-post 方法调用Web-service。我想调用这个URL:

http://serverurl/webservice/login.php?message=[{"username":"durgesh","password":"pass123"}]

如何调用它以及如何传递参数?

【问题讨论】:

标签: android web-services http-post


【解决方案1】:

我认为这可以帮助你

urlpath="http://192.168.1.158/VisionEPODWebService/VisionEPOD.apk"; 字符串 ApkName = "VisionEPOD.apk";

        URL url = new URL(urlpath.toString()); 
        // Your given URL.             
        HttpURLConnection c = (HttpURLConnection) url.openConnection();  
        c.setRequestMethod("GET");           
        c.setDoOutput(true);            
        c.connect(); 

【讨论】:

    猜你喜欢
    • 2015-05-25
    • 2020-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多