I've developed a WebApi Put Method :
[Route("api/woo/setOrderStatusComplete")]
[HttpPut]
public HttpResponseMessage SetOrderStatus(string country, string orderNo)
which expects to be called in the form:
http://<myWebAddress>/WooService/api/woo/setOrderStatus?country=uk&orderNo=23662
I've tested my endpoint from swagger and all works fine, However, I'm having difficulty writing a code sample to call my endpoint from other C# Apps that will call this end point. Can anyone point me to an example.
As a starter for 10 I'm using :
HttpWebRequest webrequest = (HttpWebRequest)WebRequest.Create(url);
webrequest.Method = "PUT";
webrequest.ContentType = "application/json";