全請求字符串我打算髮送的請求如下所示:檢索使用Ruby捲曲
c = Curl::Easy.http_post("https://example.com", json_string
) do |curl|
curl.headers['Accept'] = 'application/json'
curl.headers['Content-Type'] = 'application/json'
curl.headers['Api-Version'] = '2.2'
end
我想日誌正在取得確切的http請求。有沒有辦法獲得實際的請求(基本路徑,查詢參數,頭文件和正文)?
您是否嘗試過你的塊中設置'curl.verbose = TRUE'? – onions