WCF REST服务是否支持HTTP 301重定向?

WCF REST服务是否支持HTTP 301重定向?,wcf,rest,http-status-code-301,Wcf,Rest,Http Status Code 301,是否可以为WCF REST服务实现HTTP 301重定向,以便表单的URL: 重定向到 (有关此问题的客户端案例,请参阅)确定只需设置位置和状态代码 WebOperationContext.Current.OutgoingResponse.Location = "http://server/customers/324"; WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.MovedPermanen

是否可以为WCF REST服务实现HTTP 301重定向,以便表单的URL:

重定向到


(有关此问题的客户端案例,请参阅)

确定只需设置位置和状态代码

WebOperationContext.Current.OutgoingResponse.Location = "http://server/customers/324";
WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.MovedPermanently;
我不知道WCF客户端如何处理重定向,但使用HttpWebRequest相对简单