2016-05-04 32 views
1

我有一個API端點,看起來像這樣:與捲曲要求測試的API端點,GET,用PARAM

module Api 
    class SomeEndpoint < BaseController 

    def index 
     ... 
     params['product_id']], 
     ... 
     end 
    end 
end 

打這將是/ API/some_endpoint路線。我還需要發送一個params散列。我正在嘗試僅QA這個端點。我將如何向它發送一個curl請求以進行質量檢查?

回答

2

願這幫助你

curl -X GET -F "product_id = 1" https://hostname/some_endpoint