- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi THTTPClient PostURL
function PostURL(const AURL: string; Parameters: TStrings): string;
var
HttpClient: THttpClient;
HttpResponse: IHttpResponse;
begin
HttpClient := THTTPClient.Create;
try
HttpClient.ConnectionTimeout:=3000;
HttpClient.ResponseTimeout:=3000;
HttpResponse := HttpClient.Post(AURL, Parameters, nil, TEncoding.UTF8);
Result := HttpResponse.ContentAsString();
finally
HttpClient.Free;
end;
end;