nodejs-wechat
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "nodejs-wechat", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "nodejs wrapper of wechat(weixin) api - well tested and bug-free", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,3 +18,5 @@ # Nodejs Wechat | ||
}; | ||
var parse = xmlBodyParser(); | ||
var parse = xmlBodyParser({ | ||
type: 'text/xml' | ||
}); | ||
var wechat = new Wechat(opt); | ||
@@ -45,3 +47,5 @@ wechat.on('event.subscribe', function(session) { | ||
var middlewares = require('express-middlewares-js'); | ||
app.use('/weixin', middlewares.xmlBodyParser()); | ||
app.use('/weixin', middlewares.xmlBodyParser({ | ||
type: 'text/xml' | ||
})); | ||
@@ -53,3 +57,3 @@ /* | ||
app.use('/weixin', xmlBodyParser({ | ||
type: ['application/xmlplus', 'xml'], | ||
type: 'text/xml', | ||
limit: '1mb' | ||
@@ -98,2 +102,5 @@ })); | ||
> __NOTE__: We apply `{ type: 'text/xml' }` to `xmlBodyParser` as weixin server | ||
send us a `text/xml` content type instead of `application/xml`. | ||
### __API__ | ||
@@ -100,0 +107,0 @@ #### Wechat |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13333
165