{"action":"created","issue":{"url":"https://api.github.com/repos/node-webot/wechat/issues/166","labels_url":"https://api.github.com/repos/node-webot/wechat/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/node-webot/wechat/issues/166/comments","events_url":"https://api.github.com/repos/node-webot/wechat/issues/166/events","html_url":"https://github.com/node-webot/wechat/pull/166","id":72663768,"number":166,"title":"support content-type \"text/xml\"","user":{"login":"feitian124","id":1425383,"avatar_url":"https://avatars.githubusercontent.com/u/1425383?v=3","gravatar_id":"","url":"https://api.github.com/users/feitian124","html_url":"https://github.com/feitian124","followers_url":"https://api.github.com/users/feitian124/followers","following_url":"https://api.github.com/users/feitian124/following{/other_user}","gists_url":"https://api.github.com/users/feitian124/gists{/gist_id}","starred_url":"https://api.github.com/users/feitian124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feitian124/subscriptions","organizations_url":"https://api.github.com/users/feitian124/orgs","repos_url":"https://api.github.com/users/feitian124/repos","events_url":"https://api.github.com/users/feitian124/events{/privacy}","received_events_url":"https://api.github.com/users/feitian124/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-02T15:58:42Z","updated_at":"2015-05-03T07:43:16Z","closed_at":"2015-05-03T07:40:06Z","pull_request":{"url":"https://api.github.com/repos/node-webot/wechat/pulls/166","html_url":"https://github.com/node-webot/wechat/pull/166","diff_url":"https://github.com/node-webot/wechat/pull/166.diff","patch_url":"https://github.com/node-webot/wechat/pull/166.patch"},"body":"try fix #164\r\nthe default sails http middleware seems not work with 'text/xml' post request well and result error in req, which not fire [load](https://github.com/node-webot/wechat/blob/master/lib/wechat.js#L90) function at all.\r\n\r\nafter debug, there are two way to fix this:\r\n\r\n1. parser `req.weixin` in a middleware before invoke wechat, since wechat will use it directly if find [it](https://github.com/node-webot/wechat/blob/master/lib/wechat.js#L422).\r\n\r\n2. override sails body-parse using `express-xml-bodyparser` then use the result in load.\r\n\r\nthis PR implement 2.\r\n\r\nthanks.\r\n"},"comment":{"url":"https://api.github.com/repos/node-webot/wechat/issues/comments/98448595","html_url":"https://github.com/node-webot/wechat/pull/166#issuecomment-98448595","issue_url":"https://api.github.com/repos/node-webot/wechat/issues/166","id":98448595,"user":{"login":"JacksonTian","id":327019,"avatar_url":"https://avatars.githubusercontent.com/u/327019?v=3","gravatar_id":"","url":"https://api.github.com/users/JacksonTian","html_url":"https://github.com/JacksonTian","followers_url":"https://api.github.com/users/JacksonTian/followers","following_url":"https://api.github.com/users/JacksonTian/following{/other_user}","gists_url":"https://api.github.com/users/JacksonTian/gists{/gist_id}","starred_url":"https://api.github.com/users/JacksonTian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacksonTian/subscriptions","organizations_url":"https://api.github.com/users/JacksonTian/orgs","repos_url":"https://api.github.com/users/JacksonTian/repos","events_url":"https://api.github.com/users/JacksonTian/events{/privacy}","received_events_url":"https://api.github.com/users/JacksonTian/received_events","type":"User","site_admin":false},"created_at":"2015-05-03T07:43:16Z","updated_at":"2015-05-03T07:43:16Z","body":"`1.2.5 published`"}}