You could set the Location header:

public HttpResponseMessage Get()

{

var response = Request.CreateResponse(HttpStatusCode.Found);

response.Headers.Location = new Uri("http://www.google.com");

return response;

}

posted on 2017-03-08 15:14  今夜太冷  阅读(362)  评论(0)    收藏  举报