public HttpResponseMessage GetFastlySettings() { var result = FastlyCacheComponent.GetSettingsJSON(); return(new HttpResponseMessage() { Content = new StringContent(string.Concat(result), Encoding.UTF8, "application/json") }); }
public async Task <HttpResponseMessage> SaveFastlySettings() { string rawData = await Request.Content.ReadAsStringAsync(); HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK); if (FastlyCacheComponent.SaveSettingsJSON(rawData)) { response.Content = new StringContent("success"); } else { response.Content = new StringContent("error"); response.StatusCode = HttpStatusCode.InternalServerError; } return(response); }