public HttpResponseMessage GetLocation(HttpRequestMessage request) { var result = service.GetLocation(); HttpResponseMessage response = new HttpResponseMessage(); response = request.CreateResponse(HttpStatusCode.OK, new { success = true, obj = result }); return(response); }