【发布时间】:2012-05-06 23:09:39
【问题描述】:
这是我的帖子:
account_id 1231
limit 3
ordertype limit
quantity 1
symbol USDJPY
transaction_type buy
在我的代码中,我有:
var account_id = req.param('account_id', null);
var symbol_pair = req.param('symbol', null);
var transaction_type = req.param('transaction_type', null);
var order_type = req.param('ordertype', null);
var amount = req.param('amount', null);
var limit = req.param('limit', null);
console.log(account_id + " | " + symbol_pair + " | " + transaction_type + " | " + order_type + " | " + amount + " | " + limit);return;
但由于某种原因ordertype 又回来了market。有什么想法吗?
【问题讨论】:
-
这样的问题很难回答。也许您忘记了下划线(order_type vs ordertype)?你可以通过 console.log( req.params ) 来查看你有哪些可用的参数。
-
需要更多信息。您能否向我们展示实际执行 POST 的代码?请尝试@Pickels 记录
req.params的建议。