2
从控制器,有没有办法发送POST请求到具有参数的特定域?如何通过mvc中的重定向发出POST请求?
我想归档看起来是这样的:
public ActionResult Index()
{
Redirect("https://www.anothersite.com", new { s = "abc" });
}
我想在客户端做在服务器端,而不是用ajax:
$.ajax({
url: 'https://www.anothersite.com',
type: 'POST',
data: { s: 'abc' }
}).done(function (data) {
// logic...
})
这可能吗?
好主意。我现在会尝试。非常感谢! –