I need to add a Post method, and have gotten this start:
private void AddDepartment()
{
// AccountId (int) and Name (string) are the two vals other than Id, which is auto-added on the server
int onAccountOfWally = 42;
string moniker = "Wild Billy Jack Black Stallion";
Cursor.Current = Cursors.WaitCursor;
try
{
string uri = String.Format("http://platypus:28642/api/Platypi/{0}/{1}", onAccountOfWally, moniker);
var webRequest = (HttpWebRequest)WebRequest.Create(uri);
webRequest.Method = "POST";
//var webResponse = (HttpWebResponse)WebResponse. <-- there is no "Create" for this...
}
finally
{
Cursor.Current = Cursors.Default;
}
}
What do I need to do to send this uri on up to be processed?
Note: If it makes any difference, the client is a Windows CE / .NET 3.5 project. I am using JSON.NET