我怎么能通过环回中的远程方法接收xml?

时间:2016-12-28 07:22:12

标签: node.js xml loopback

我尝试创建一个接受XML的远程方法,我定义了这样的远程方法,

WechatModel.remoteMethod('notify', {
    description: 'notify',
    accepts: [
      {
        arg: 'response',
        type: 'string',
        required: true,
        http: {
          source: 'body',
        },
      },
    ],
    http: {
      verb: 'post',
      path: '/notify',
    },
  });

然后我改变了我的server / config.js:

"rest": {
  "normalizeHttpPath": false,
  "xml": true
},

但是,我仍然有一个包含内容" [object Object]"

的字符串

0 个答案:

没有答案