简体   繁体   中英

Consume web service using post in c#

Currently I have less information about this, but I will update soon with more details. I have been provided with a web page which provides user name & password option to access a url & return a token value. The form contains that url in action & the method used is POST.

I have tried general HttpWebRequest methods to access the url, but have been unsuccessful so far. It gives error "cannot connect to remote server"

The url is like www.somesite.com\\method.php\\level1\\method1\\xml

The url confuses me as other links have some extension at the end(I am relatively new to this web service)

I have been told this webservice has been consumed in mobile.

Can someone please guide me as to how to access a web service in c# using POST method?

I apologise for the lack of detailed information

First try to understand how the webservice works. You can simply create a simple c# rest web service. To return json data , you will need to specify the return data format on specific operation in the web service. To use mysql for database, you can search for mysql connector for c# on google. You can find libraries to use in your code. Hope it helps !

http://www.codeproject.com/Articles/201901/CREATE-RESTful-WCF-Service-API-Using-POST-Step-By

我可以通过提供代理详细信息进行访问。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM