您能否纠正我在调用 http delete 时在这里犯的错误。我得到 InternalServerError 没有进一步的解释。
相同的调用在 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' for # (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