我做的紅寶石的http請求:停止紅寶石http請求修改標題名稱
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req.body = payload
req['customeheader'] = 'xxxxxxxxx'
http.set_debug_output $stdout
我已經調試接通和當請求被貼可以看我的頭被張貼:
Customheader: xxxxxxxxx
反正有沒有阻止這種,我張貼到是給一個錯誤,因爲頭名是不正確的第三方服務器 - 這是期待customheader:
謝謝 - 我沒有想到這一點。順便提一下,只需要在這個特定情況下修補write_header。 – 2012-04-23 07:19:23