Synapse, how to | curl_setopt($ch, CURLOPT_USERPWD, "$accessKey:$secretKey"); lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cpalx · 2018-10-16 19:57 how can i make this PHP  code in lazarus with synapse? curl_setopt($ch, CURLOPT_USERPWD, "$accessKey:$secretKey"); ---------------------------------------------------------------------- cpalx · 2018-10-16 19:59 i have something like: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  HTTP := THTTPSend.Create;  HTTP.Sock.CreateWithSSL(TSSLOpenSSL);  HTTP.Sock.SSLDoConnect;  StrList:= TStringList.Create;  try    URLData:= '{"amount":"1200.00"}';    WriteStrToStream(HTTP.Document, URLData);    HTTP.MimeType := 'application/json';     HTTP.Headers.Add( 'Authorization: Basic  accessKey:secretKey'); ---------------------------------------------------------------------- Leledumbo · 2018-10-17 07:15 Quote from: cpalx on October 16, 2018, 09:59:23 pmi have something like: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ...HTTP.Headers.Add('Authorization: Basic  accessKey:secretKey');  Almost: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses base64;...HTTP.Headers.Add('Authorization: Basic ' + EncodeStringBase64('accessKey:secretKey')); or my preference: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses base64;...HTTP.Headers.Values['Authorization'] := 'Basic ' + EncodeStringBase64('accessKey:secretKey'); ---------------------------------------------------------------------- Thaddy · 2018-10-17 07:34 In this case - everybody knows I love synapse - why not simply use the libcurl bindings that come as standard with Freepascal?