After a lot of tries, It seems that the problem is that Synapse doesn't seem to work, I mean, it compiles ok, but then, even for not https, urls, it gets always empty strings. I've read in
https://forum.lazarus.freepascal.org/index.php/topic,49443.msg360431.html#msg360431 that there ws a problem with older versions of fpc.exe, but I'm using fpc 3.2.0.
For instance, here are several tests:
SynHttp := THTTPSend.Create;
//SynHttp.Sock.CreateWithSSL(TSSLOpenSSL);
//SynHttp.Sock.SSLDoConnect;
SynHttp.HTTPMethod('GET', 'http://...'); //+'?id='+id+'&mensaje='+mensaje);
respuesta := TStringList.create;
respuesta.LoadFromStream(SynHttp.Document);
incluyeEnLista('Synapse GET: '+respuesta.Text);
...
response := TMemoryStream.create;
try
HttpPostURL('http://...','id='+id+'&mensaje='+mensaje',response);
incluyeEnLista('Synapse POST: '+StreamToString(response));
finally
response.free;
end;
...
respuesta := tStringList.create;
HttpGetText('http://...',respuesta);
incluyeEnLista('Synapse 2 '+respuesta.Text);
The same url, using jHttpClient, works (but not with a https url):
HttpClient.AddNameValueData('id', id);
HttpClient.AddNameValueData('mensaje', mensaje);
//Non-blocking! handled by: OnCodeResult and OnContentResult
HttpClient.PostNameValueDataAsync(servidorWeb+urlRecepcionSMS);
I've recompiled laz_synapse and it seems to localize openssl libraries:
Ventana de Mensajes
Verbose: Selected chip architecture: armeabi-v7a
Verbose: Taking libraries from folder: ...\libs\armeabi-v7a
Verbose: Found library: libcontrols.so
Verbose: Found library: libcrypto.so
Verbose: Found library: libssl.so
Compilar paquete laz_synapse 40.1: Éxito
Please, Could someone of you give me some example or a hint to keep trying?