Sha256: 823eb1004c1ecdb85460686956762ed3db82bb24b08010feb1579a3b1c836fc4

Contents?: true

Size: 713 Bytes

Versions: 6

Compression:

Stored size: 713 Bytes

Contents

# coding: utf-8
module Lanmao
  module Form
    module DataHelper

      # 跳转到新网 Form 类的 api,统一返回处理
      #
      # @param service [ String ] 富民的服务
      # @param params [ Hash ] 参数
      #
      # @return [ Hash ] 结果集
      #   * form_method
      #     * url
      #     * method
      #   * form_data
      #     * :data
      #
      def get_form_data(service, params)
        request = Http::Request.new(params, @config, service, :gateway)
        body, url = request.get_body

        {
          form_method: {
            :url => url,
            :method => :post,
          },
          form_data: body,
        }
      end

    end # DataHelper
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lanmao-0.8.0 lib/lanmao/form/form_helper.rb
lanmao-0.7.0 lib/lanmao/form/form_helper.rb
lanmao-0.6.0 lib/lanmao/form/form_helper.rb
lanmao-0.5.0 lib/lanmao/form/form_helper.rb
lanmao-0.4.0 lib/lanmao/form/form_helper.rb
lanmao-0.2.0 lib/lanmao/form/form_helper.rb