lib/intacctrb/base.rb in intacctrb-0.9.3 vs lib/intacctrb/base.rb in intacctrb-0.9.4
- old
+ new
@@ -64,10 +64,12 @@
@sent_xml = xml
url = "https://www.intacct.com/ia/xml/xmlgw.phtml"
uri = URI(url)
retry_count += 1
- res = Net::HTTP.post_form(uri, 'xmlrequest' => xml, read_timeout: 300)
+ conn = Net::HTTP.new(uri)
+ conn.read_timeout = 300
+ res = conn.post_form(uri, 'xmlrequest' => xml)
@response = Nokogiri::XML(res.body)
IntacctRB.logger.debug res.body
if successful?
if key = response.at('//result//RECORDNO') || response.at('//result//key')
set_intacct_id key.content if object