【文件属性】:
文件名称:json-rpc2rest:Json-Rpc 到 Rest 机架中间件
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-10 06:19:22
Ruby
Json-Rpc 休息
为请求进行内部重定向的中间件。
安装
gem install json-rpc2rest
或将以下行添加到 Gemfile:
gem 'json-rpc2rest'
并从您的 shell 运行bundle install 。
之后添加行到config/application.rb
config . middleware . use 'Json-Rpc2Rest'
您也可以使用方法名称指定字段
config . middleware . use 'Json-Rpc2Rest' , field : 'requestMethod'
默认字段是"method" 。
例子
# config/application.rb
config . middleware . use 'JsonRpcToRest'
使用参数将请求发布到/api
{ " metho
【文件预览】:
json-rpc2rest-master
----.gitignore(28B)
----README.md(2KB)
----json-rpc2rest.gemspec(725B)
----Gemfile(210B)
----.rspec(45B)
----spec()
--------lib()
--------spec_helper.rb(529B)
----.travis.yml(168B)
----lib()
--------json-rpc2rest.rb(1KB)
----Rakefile(212B)