public IEnumerable <ImageMetaData> GetImages() { Response.Headers.Add("Access-Control-Allow-Origin", "*"); Response.StatusCode = (int)HttpStatusCode.OK; var imageData = _imageAction.GetImages(); return(imageData); }
public HttpResponseMessage GetImages() { var imageData = _imageAction.GetImages(); var response = Request.CreateResponse(HttpStatusCode.OK, imageData); response.Headers.Add("Access-Control-Allow-Origin", "*"); return(response); }