# File rice/icemachine.rb, line 74 def sendPayload(payload, url) url = Rice::URL.parse(url) if url.kind_of?(String) body = nil Net::HTTP.start(url.host, url.port) { | http | response, body = http.post(url.path, payload.to_xml) } return body # With this code in place, I see a "405 Method Not Allowed" return value # when I try to retry a 301 error. # body = nil # begin # response, body = http.post(url.path, payload.to_xml) # rescue Net::ProtoRetriableError => e # head = e.data # if head.code == '301' # Moved permanently # url = Rice::URL.parse(head['location']) # http.finish() # http = Net::HTTP.new(url.host, url.port) # retry # end # end # http.finish() # return body end