POST请求res.redirect()不起作用

这是我的邮政路线。 当我提交表格时,基本上只是拖延了。 该post正在向服务器发送,但响应(redirect)不会被发送回客户端。

app.post('/signup', function(req, res) { var customer = req.body.customer; var newCustomer = { "first_name": customer.first_name, "last_name": customer.last_name, "email": customer.email, "password": customer.password, "phone": customer.phone, "address": `${customer.address} ${customer.appt}`, "city": customer.city, "state": customer.state, "zip": customer.zip, "country": "US", "gateway_type": "PayWhirl Test Gateway", "gateway_id": 4133, "currency": "USD", "metadata": customer.referral } paywhirl.Customers.createCustomer(newCustomer, function() { if(err) { console.log(err); res.redirect('/', {err: err}); } else { console.log('customer created!'); res.redirect('/', {first_name: customer.first_name}); } }); }) 

这就是所谓的paywhirl函数:

 createCustomer: function(data, cb) { options.path = "/create/customer"; options.method = "POST"; utils.pwPOST(options, data, cb); },