我在Node.js中使用request.js http請求。請求後重定向沒有發佈數據
request({
method: 'POST',
uri: 'http://www.example.com/getData',
followAllRedirects: true,
followOriginalHttpMethod: true,
json: true,
form: {
id: 1,
msg: 'Test data',
},
}, (err, res, body) => {})
讓發帖時{ id: 1, msg: 'Test data' }
到http://www.example.com/getData
,代理會重定向到http://us.example.com/getData
說。
上面的代碼重定向到http://us.example.com/getData
,但是如何設置重定向和發佈數據?
因此,該標準不要求發佈重定向與原始發佈數據一起發送? – huachengzan