I can't get your test script to work at all ('cookie_a' is never returned). I tried using every version of HTTPRequest that I have (making sure to use the correct codepage options for each). Here's the throw-away account I made for that site (name= pokmijn, pw= zxcvbnm). I tried it with AHK v1.0.48.05 and AHK-L v1.1.0.0 Unicode (32 bit).
For simplicity's sake, could you use this example for testing?
Code:
; HTTPRequest Example: submit POST data (SOAP XML) to a website
Gui, Font, S11, Lucida Bright
Gui, Margin, 3, 3
Gui, Add, Text, w657 h22 center 0x200, Fahrenheit to Celcius API example.
Gui, Add, Edit, xm w215 h22 vdegf right section
Gui, Add, Button, ys w215 h22 default gdoit, Convert
Gui, Add, Edit, ys w215 h22 vdegc right
Gui, Add, Edit, xs w657 r20 vhdrbox
Gui, Show,, Simple API Example.
Return
GuiClose:
Exitapp
doit:
Gui, Submit, NoHide
API_EndPoint := "http://www.w3schools.com/webservices/tempconvert.asmx"
Headers := "Content-Type: application/soap+xml"
Data =
( LTRIM JOIN
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<FahrenheitToCelsius xmlns="http://tempuri.org/">
<Fahrenheit>%degf%</Fahrenheit>
</FahrenheitToCelsius>
</soap12:Body>
</soap12:Envelope>
)
size := HTTPRequest( API_EndPoint, Data, Headers, "charset=utf-8" )
StringLeft, Data, Data, InStr( Data, "</Fahre" ) - 1
StringTrimLeft, Data, Data, InStr( Data, ">", 0, 0 )
GuiControl,, degc, % Data
GuiControl,, hdrbox, % Headers
Return
HttpSendRequestEx shouldn't care about the actual POST data aside from its length (as a member of INTERNET_BUFFERS) so I would like to concentrate on that function and its input. What happens when you hardcode the INTERNET_BUFFERS at size 40? (like the code in my previous post).
Another thing to try is changing the very last (Ptr) to ("UInt") for HttpSendRequestEx. It violates the parameter's description on MSDN, ...but if it works....