Comments (3)
param_xml = request.body.read
xml 字符串,放入body内。
from weixin_rails_middleware.
@lanrion
请问在哪里写 request.body = " xml...." ? 但问题是,在测试中,还没有等生成 @weixin_message,就先执行了default_url_options 方法的 @weixin_message.FromUserName
了 ,所以测试才会报错的.
要不这样改 ?
before(:each) do
WeixinRailsMiddleware::WeixinController.class_eval do
protected
def default_url_options(options={})
{ weichat_id: "o17q2s7mMOrwcFC8WT1BFgBJzAPE"}
end
end
end
from weixin_rails_middleware.
这个还真没测试过。
from weixin_rails_middleware.
Related Issues (20)
- 公众平台消息体签名及加解密方案 HOT 1
- 重复的 `private` ? HOT 3
- weixin_token_string 验证失败 HOT 2
- 转发多客服消息 HOT 3
- 小视频消息 HOT 2
- 自动回复功能 HOT 18
- 取消关注 报错 NoMethodError (undefined method `empty?' for true:TrueClass): HOT 10
- reply_transfer_customer_service_message 未提供指定客服参数 HOT 1
- 要对不同微信回复消息XML结构要实现到自动匹配
- 如何在weixin_controller_decorator.rb文件以外使用reply方法 HOT 2
- Rails 5 貌似不支持。 HOT 4
- 貌似 rails 5 开始不鼓励使用 before_filter 了 HOT 2
- 无法看到log HOT 3
- Rails5.1 貌似会取消这个 before_filter HOT 3
- 版本 1.3.2,初始配置校验,报MissTemplate错误 HOT 10
- Filter chain halted as :check_weixin_legality rendered or redirected HOT 3
- message.to_xml的class是Nokogiri::XML::Element Prpcrypt.encrypt加密的时候会undefined method `force_encoding' for #<Nokogiri::XML::Document HOT 1
- Weixin signature NotMatch HOT 4
- NameError: uninitialized constant HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weixin_rails_middleware.