procedure TForm1.Button1Click(Sender: TObject);
var
Http : TclHttp;
clHttpRequest : TclHttpRequest;
response : TStringList;
Data : TclJSONObject;
begin
Http := TclHttp.Create(nil);
clHttpRequest := TclHttpRequest.Create(nil);
response := TStringList.Create() ;
Data := GetJasonBody('a', 'b', 'v', 'sdfd');
try
Http.TLSFlags := [tfUseSSL2, tfUseSSL3, tfUseTLS, tfUseTLS11, tfUseTLS12];
Http.Port := 8080;
clHttpRequest.Header.Clear;
clHttpRequest.Header.Accept := 'application/json';
clHttpRequest.Header.ContentType := 'text/plain';
clHttpRequest.Header.ExtraFields.Add('token:2124124');
clHttpRequest.BuildJSONRequest(Data);
Http.Post('
localhost:8080/startTransaction', clHttpRequest, response);
finally
Data.Free;
Http.Free;
clHttpRequest.Free;
response.Free;
end;
end;