简体   繁体   中英

Calling a c# web form web service from Xamarin

I created ac# aspx.cs web form web service in visual studio which would return a string of Json result upon calling this:

string url = "http://crowd.sit.nyp.edu.sg/FRSIPad/GetFacilities.aspx?DepartmentID=" + departmentID
            + "&Block=" + block + "&Level=" + level + "&Name=" + name + "&DeviceID=&Hash=";

The web service is written in Json RESTful method. I hosted the program on the IIS server. I read about calling the web service from Xamarin studio. I am doing this on the cross-platform and running on IOS. I have researched about HttpWebRequest and i am not sure if i am on the right track. Please advice how i can call this web service of mine and store it into ac# object in xamarin? Help would be much appreciated.

I've been using RestSharp successfully in a Xamarin project. It works great.

Check it out: http://restsharp.org/

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