public HttpResponseMessage Blog(Blog blog) { if (ModelState.IsValid) { setup.CreateBlog(blog); var response = new HttpResponseMessage(HttpStatusCode.OK); response.Headers.Location = new Uri(Request.RequestUri.Authority + "/?install=3"); return(response); } else { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } }