People, I’m trying to request from a webserver witch uses HTTPs as protocol, but i’m having a lot of troubles. My application crashes everytime I try to send a new request to the server and I can’t understand why does it happens.
To make this request I’m using the WinHTTP lib with Clarion 9.1 and a class that I found on the Webnar from RavenDB called WebClientClass.clw.
Here is a bunch of code:
if SELF.InValidState() Verb = UPPER(Verb) WideAddress = SELF.ToWideString(Verb) if WideAddress <> 0 SELF.hRequest = wc_WinHttpOpenRequest(SELF.hConnect,WideAddress,lpObjectName,0,WINHTTP_NO_REFERER,WINHTTP_DEFAULT_ACCEPT_TYPES,WINHTTP_FLAG_SECURE) if SELF.hRequest = 0 message(getLastError()) else message(SELF.hRequest) end ELSE self.ThrowError(err:ToWideStringFailed,'Verb could not be translated to widestring.') end!if end!if
Here is the place where I create the request and the interesting part is that I don’t have any problem. Theoretically I’m working with HTTPs because I’m using the ‘WINHTTP_FLAG_SECURE’ parameter. Here is the documentation of this function: https://msdn.microsoft.com/en-us/library/windows/desktop/aa384099(v=vs.85).aspx
Does anyone ever tryied something like this? The server returns to me the 502 ERROR, but i’m not using any proxy.