Hi All
We have been using the HTTPClient successfully for months in one of our applications, it has stopped working and the following code returns a -1 for the call and an empty string for the responsetext. The odd thing is that the same EXE works on Windows 10, but not on Win 7 or 8. The Version is PB2017R3 Build 1915.
As far as we can tell nothing has changed at the client side, but we cannot say the same for the server side.
The sendrequest returns -1 and getresponsestatustext is empty. Not much to go on really.
Any thoughts please?
*****************************************************************************
l_http = Create httpclient
l_http.autoreaddata = true
l_http.secureprotocol = 5 // TLS 1.2
l_http.timeout = 60
// prepare header
lul_length = Len(ls_data)
li_rc = l_http.clearrequestheaders( )
li_rc = l_http.SetRequestHeader("Content-Length", String(lul_length))
li_rc = l_http.SetRequestHeader("Content-Type", 'application/json;charset=utf-8')
li_rc = l_http.SetRequestheader( 'Host', is_host)
li_rc = l_http.SetRequestheader( 'Connection', 'Keep-Alive')
li_rc = l_http.SetRequestheader( 'User-Agent', 'Apache-HttpClient/4.1.1 (java 1.5)')
li_rc = l_http.SetRequestheader( 'Accept', 'application/json')
//post request
li_rc = l_http.sendrequest( 'POST', 'https://' + is_host + '/mpay2-service/auth/login', ls_data)
if li_rc < 0 then
ls_rc = l_http.getresponsestatustext( )
messagebox('Pax2Pay','Response Text (' + ls_rc + ') recieved from Pax2Pay Logon Send request')
end if
*****************************************************************************