how to do http post with tschttpwebrequest with tsl 1.2

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
fuandi
Posts: 6
Joined: Mon 26 Feb 2018 03:16

how to do http post with tschttpwebrequest with tsl 1.2

Post by fuandi » Tue 27 Aug 2019 01:21

I’m using devart securebridge tschttpwebrequest to do a http post to a server with tsl 1.2.
I got this error EScError with message 'Socket closed. Cannot receive data'

I set the property tsl1.2 to true.
Below is my snippet code, any mistake or something I missed ?

ScHttpWebRequest1.RequestUri:='https://blablabla';
ScHttpWebRequest1.Method:= rmPost;
ScHttpWebRequest1.Accept:='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
ScHttpWebRequest1.ContentType := 'application/json';


Buf := TEncoding.UTF8.GetBytes(jsonResult.ToString);
ScHttpWebRequest1.ContentLength := Length(Buf);
ScHttpWebRequest1.WriteBuffer(Buf);

httpwebresponse := ScHttpWebRequest1.getresponse;

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: how to do http post with tschttpwebrequest with tsl 1.2

Post by ViktorV » Tue 03 Sep 2019 12:53

For us to quickly investigate this behavior of SecureBridge, please allow test access to your server and send it to us using the contact form https://www.devart.com/company/contactform.html.

fuandi
Posts: 6
Joined: Mon 26 Feb 2018 03:16

Re: how to do http post with tschttpwebrequest with tsl 1.2

Post by fuandi » Wed 04 Sep 2019 01:37

Hi viktor,

Thanks for your reply.

I already write in contact form and already reply your email that the server is not for public access.
My question is, is my code above missing something ? or do you have any example on how to do http post to with tsl1.2 ?
Can you write here on how to do this the proper way ?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: how to do http post with tschttpwebrequest with tsl 1.2

Post by ViktorV » Wed 04 Sep 2019 13:18

We haven't received any emails from you saying that you are not able to provide us with test access to the server. Your code runs correctly, therefore, we asked for test access to your server to identify the cause of the issue.

Post Reply