public HttpResponseMessage AddGMapsMarker(HttpRequestMessage request) { var data = request.Content.ReadAsStringAsync().Result; if (data == null) { return(new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent("Post data is empty") }); } else { Debug.WriteLine(data); var blogdata = JsonConvert.DeserializeObject <GMapsMarker>(data); blogService.AddGMapsMarker(blogdata); return(new HttpResponseMessage(HttpStatusCode.OK)); } }