Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

When writing clients in C# to consume the API, there are several techniques possible.

Use the ServiceStack Client

  1. Install the ServiceStackVS extension
  2. Add References to System.Runtime.Serialization and System.Net
  3. Right-click on the project and choose "Add ServiceStack Reference..."
  4. Enter the address of the host and name the service
  5. Add the following Code:

    Using ServiceStack.Client
    var client = new ServiceStack.JsonServiceClient("http://api.jiwa.com.au");
    var authResponse = client.Send<ServiceStack.AuthenticateResponse>(new ServiceStack.Authenticate()
    {
    	provider = "credentials",
    	UserName = "api",
    	Password = "password",
    	RememberMe = true
    });
    
    // Read a debtor
    var serviceStackDebtorResponse = client.Get(new DebtorGetRequest { AccountNo = "1001" });

 

Filter by label

There are no items with the selected labels at this time.

  • No labels