2
請您在調用http delete時糾正我在這裏所犯的錯誤。 我得到InternalServerError沒有進一步的解釋。Ruby請求正文和內容類型的Restclient.delete
相同的調用在FireFox RESTClient插件上正常工作。
樣品RESTClient實現
require "rest_client"
data= {"name" => "foo"}
res = RestClient.delete(url, data.to_json)
拋出:/lib/restclient/request.rb:72:in process_url_params': undefined method
delete_if」爲#(NoMethodError)
樣品淨/ HTTP
http = Net::HTTP.new('some ip valid', port)
headers = {'Content-Type' => 'application/json'}
data = {"name" => "foo"}
resp, data = http.delete(path, headers)
引發:Net :: HTTP InternalserverError