我正在尝试获取以前有效但再次工作的http post请求。
def post_params
uri = Addressable::URI.new
uri.query_values = {
from: @from_city_id,
to: @to_city_id,
tmp_from: @from_city,
tmp_to: @to_city,
date: @when_date.strftime('%d.%m.%Y')
}
uri.query
end
http = Net::HTTP.new "www.domain.com"
res = http.post '/', post_params
raise res.inspect
但我最终遇到了文件结束错误。还有一件事:我不想进行 https 查询。
谢谢你的帮助