Jump to content

winhttp Post Timeout? I think?


Alodar
 Share

Recommended Posts

So I have a bit of code where I'm sending a (very large) xml string via a POST command to a site.  Except, I think it's timing out.  Not quite sure, perhaps it's not, and I just have it written wrong?  All I get in SCITE is Error in this kind of orange text (not the usual black).  My responsetext and status and statustext don't come back as anything, so I'm kind of at a loss as to how to troubleshoot past this.  Anyone have an idea for me?  (I had to hide the site and dbid in the quickbase URL as it's my company, so I can't post it for confidentiality reasons).

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("POST", http://<mysite>.quickbase.com/<mydbid>, False)
$oHTTP.SetRequestHeader("Content-Type", "application/xml")
$oHTTP.SetRequestHeader("QUICKBASE-ACTION", "API_ImportFromCSV")
$oHTTP.Send($xmlStr)
$oReceived = $oHTTP.ResponseText
$oStatusCode = $oHTTP.Status

ConsoleWrite(IsObj($oReceived) & @CRLF)
ConsoleWrite(IsObj($oStatusCode) & @CRLF)
ConsoleWrite($oStatusCode & @CRLF)
ConsoleWrite($oReceived & @CRLF)
 

 

the $xmlStr is an XML string / file that is 62MB...I'm thinking the size is part of the problem, but I really can't cut it down.  I'm hoping I can just find a way to retrieve a status for when it timed out or didn't work or something, but since I'm getting nothing except that weird orange Error in Scite, not quite sure what to do.

 

 

Edited by Alodar
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...