Nachos Pillage Milwaukee
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

weixin-body-parser

0.0.7 • Public • Published

weixin-body-parser

微信消息解析中间件

Install

    npm install weixin-body-parser --save

Usage

    var wxBodyParser = require('weixin-body-parser');
    
    app.use(wxBodyParser({token:'token', encrypt_key:'encrypt_key',app_id:'app_id'}));

Example

POST XML :

<xml>
  <AppId>12345678<AppId>
  <CreateTime>1413192605<CreateTime>
  <InfoType>component_verify_ticket<InfoType>
  <ComponentVerifyTicket>aaaaaaaaaaaaaaaaaaaaaaaaa</ComponentVerifyTicket>
</xml>

req.body :

    {
        app_id: '12345678',
        create_time: '1413192605',
        info_type: 'component_verify_ticket',
        component_verify_ticket: 'aaaaaaaaaaaaaaaaaaaaaaaaa'
    }	

install

npm i weixin-body-parser

Downloadsweekly downloads

14

version

0.0.7

license

MIT

homepage

github.com

last publish

collaborators

  • avatar