public HttpResponseMessage Delete(string strApiKey) { string strDomainName = PageUtility.GetCurrentDomainName(); HttpClient client = new HttpClient(); client.BaseAddress = new Uri(strDomainName); // Add an Accept header for JSON format. client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage response = client.DeleteAsync(strApiKey).Result; // Blocking call! return response; }
{StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { X-SourceFiles: =?UTF-8?B?RDpcU2F0eWVuZHJhXERldmVsb3BlbWVudFxUZXN0QXBpXFRlc3RBcGlcYXBpXFRlc3RcMw==?= Cache-Control: private Date: Tue, 25 Nov 2014 10:31:10 GMT Server: Microsoft-IIS/8.0 X-Powered-By: ASP.NET Content-Length: 4917 Content-Type: text/html; charset=utf-8 }}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)