-
Notifications
You must be signed in to change notification settings - Fork 1.2k
support content-type "text/xml" #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lib/wechat.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该是判断到rawBody存在以后,就不要去侦听data和end事件了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
恩,貌似更合理一点,我去改下。
|
想加一个测试, 按照 supertest 的文档, 应该是可以直接 post joson 的, 但我在这里试了下最简单的例子也不行,先注释掉测试了, 有空帮看看。 |
|
landed in 187b0e2 |
|
|
|
good, thanks. |
|
能分享下 rails下的接入形式么。 |
|
rails? 我是 sails。。 |
|
sails。嗯。说错。 |
|
上面咯,正好有个 issue 没搞定, 是不是 js 里面的 this 上下文不对引起? ^ ^ |
|
对sails结构不太熟。详细引用有吗 |
|
详细引用? 不太懂你什么意思. |
try fix #164
the default sails http middleware seems not work with 'text/xml' post request well and result error in req, which not fire load function at all.
after debug, there are two way to fix this:
req.weixinin a middleware before invoke wechat, since wechat will use it directly if find it.express-xml-bodyparserthen use the result in load.this PR implement 2.
thanks.