ВЖ
function TFMain.SendHTTP(AURL, AParams: string): string;
var
LStream: TStringStream;
begin
LStream := TStringStream.Create(AParams, TEncoding.UTF8);
try
LStream.WriteString(AParams);
LStream.Position := 0;
if Assigned(IdHTTP) then
with IdHTTP do
begin
ConnectTimeout := 10000;
with Request do
begin
Clear;
BasicAuthentication := true;
ContentType := 'application/x-www-form-urlencoded';
AcceptCharSet := 'utf-8';
end;
try
Result := Post(AURL, LStream);
except
on e: exception do
Result := e.Message
end;
end;
finally
LStream.Free;
end;
end;


