Skip to content

Commit

Permalink
#65 Delphi 11
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciussanchez committed Sep 22, 2021
1 parent c0b0670 commit d630355
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/RESTRequest4D.Request.NetHTTP.pas
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function TRequestNetHTTP.AddHeader(const AName, AValue: string): IRequest;
Result := Self;
if AName.Trim.IsEmpty or AValue.Trim.IsEmpty then
Exit;
{$IFDEF VER340}
{$IF COMPILERVERSION >= 34}
FNetHTTPClient.CustHeaders.Add(AName, AValue);
{$ELSE}
{TODO -oAll -cCustoms Headers : Add headers with NetHTTPClient in versions below of 10.4 Sydney}
Expand Down Expand Up @@ -250,13 +250,13 @@ function TRequestNetHTTP.ClearBody: IRequest;
end;

function TRequestNetHTTP.ClearHeaders: IRequest;
{$IFDEF VER340}
{$IF COMPILERVERSION >= 34}
var
I: Integer;
{$ENDIF}
begin
Result := Self;
{$IFDEF VER340}
{$IF COMPILERVERSION >= 34}
for I := 0 to Pred(FNetHTTPClient.CustHeaders.Count) do
FNetHTTPClient.CustHeaders.Delete(I);
{$ELSE}
Expand Down

0 comments on commit d630355

Please sign in to comment.