1

following the example I found from the bottom comment in RestSharp simple complete example

I am using the tutorial http://pawel.sawicz.eu/restsharp/ to learn about restSharp. I have little api experience so forgive me if this Q is silly but Im working on an existing Windows Service project in VS 2013.

I've added a web API Controller class I cant remember now if its a (v2.1) or (v1) controller class....Anyway I've called it SynchroniseFromAwsService and iv created a class TestApi, from within the solution. Now I want to try and call the function SapCall() on the SynchroniseFromAwsService page.

I've added code to the TestApi class

  public class TestApiCalls
{
    public void TestApi()
    {
        //GET
        var client = new RestClient("127.0.0.1");
        var request = new RestRequest("SynchronisePersonnelXmlFromAwsServiceController/SapCall/", Method.GET);
        var queryResult = client.Execute<List<Items>>(request).Data;

    }
}

it is saying <items> could not be found? do I need to add this somehow?

John
  • 3,965
  • 21
  • 77
  • 163

0 Answers0