Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/224.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在android中使用带有参数的httppost方法调用webservice_Android_Web Services_Http Post - Fatal编程技术网

在android中使用带有参数的httppost方法调用webservice

在android中使用带有参数的httppost方法调用webservice,android,web-services,http-post,Android,Web Services,Http Post,我想使用httppost方法调用Web服务。我想调用此URL: http://serverurl/webservice/login.php?message=[{“用户名”:“durgesh”,“密码”:“pass123”}] 如何调用此函数以及如何传递参数 我想这对你有帮助 urlpath=”http://192.168.1.158/VisionEPODWebService/VisionEPOD.apk"; 字符串ApkName=“VisionEPOD.apk” URL url

我想使用
httppost
方法调用
Web服务
。我想调用此URL:

http://serverurl/webservice/login.php?message=[{“用户名”:“durgesh”,“密码”:“pass123”}]


如何调用此函数以及如何传递参数

我想这对你有帮助

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