Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何配置Pipedream来测试rails中的Webhook?_Ruby On Rails_Ngrok_Pipedream - Fatal编程技术网

Ruby on rails 如何配置Pipedream来测试rails中的Webhook?

Ruby on rails 如何配置Pipedream来测试rails中的Webhook?,ruby-on-rails,ngrok,pipedream,Ruby On Rails,Ngrok,Pipedream,首先,第一次使用Webhook。我正试图在我的开发服务器上测试它。为此,我正在尝试使用PipeDream配置它,并且还安装了ngrok。但问题是如何在我的控制器中为Pipedream配置端点,因为我将被重定向到rails欢迎页面 服务类别: class DummyService include HTTParty format :json base_uri 'https://en5q.m.pipedream.net' def initialize; end def sel

首先,第一次使用
Webhook
。我正试图在我的开发服务器上测试它。为此,我正在尝试使用
PipeDream
配置它,并且还安装了
ngrok
。但问题是如何在我的控制器中为
Pipedream
配置端点,因为我将被重定向到rails欢迎页面

服务类别:

class DummyService
  include HTTParty
  format :json

  base_uri 'https://en5q.m.pipedream.net'

  def initialize; end

  def self.getData
    get("", timeout: TKlass::TIMEOUT)
  end
end 
    def index
        dummyService                 = DummyService.getData
        json                         = JSON.parse(dummyService.body.gsub("@attributes","attributes"))
        json["dummyService_enabled"] = Setting.dummyService_enabled
    
        if json.blank?
          record_not_found
        else
          render json: json
        end
      
      end

def push
    # kind = params[:push_type]
    # body = params[:push_body]
    byebug

    end
控制器:

class DummyService
  include HTTParty
  format :json

  base_uri 'https://en5q.m.pipedream.net'

  def initialize; end

  def self.getData
    get("", timeout: TKlass::TIMEOUT)
  end
end 
    def index
        dummyService                 = DummyService.getData
        json                         = JSON.parse(dummyService.body.gsub("@attributes","attributes"))
        json["dummyService_enabled"] = Setting.dummyService_enabled
    
        if json.blank?
          record_not_found
        else
          render json: json
        end
      
      end

def push
    # kind = params[:push_type]
    # body = params[:push_body]
    byebug

    end
路线

resources :webhooktester, only: [ :index ] do
      collection do
        get :push
      end
    end
我错过了什么