-1

これが私の投稿です:

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ます。何が起こっているのかアイデアはありますか?

4

2 に答える 2

3

あなたが持っていることを確認しapp.use(express.bodyParser());、試してみてくださいreq.body.account_id(そしてそれぞれに同様のスタイル)

http://expressjs.com/guide.html#http-methods

于 2012-05-07T11:04:10.457 に答える
0

あなたはorder_typeを定義し、それをordertypeで取り戻そうとしています。あなたのことを忘れないでください:アンダースコア!

于 2012-05-06T23:23:51.763 に答える