var
LRESTClient : TRESTClient;
LRESTRequest : TRESTRequest;
LRESTResponse: TRESTResponse;
begin
LRESTClient := TRESTClient.Create('https://api.nuvemshop.com.br/v1/2905426/categories');
try
LRESTClient.SynchronizedEvents := False;
LRESTResponse := TRESTResponse.Create(LRESTClient);
try
LRESTRequest := TRESTRequest.Create(LRESTClient);
try
LRESTRequest.Client := LRESTClient;
LRESTRequest.AddParameter('Authentication',
'bearer xxxxxxxxxxxxxx',
pkHTTPHEADER,
[poDoNotEncode]);
LRESTRequest.AddParameter('User-Agent',
'Your App Name (xxxxxxxxx)',
pkHTTPHEADER,
[poDoNotEncode]);
LRESTRequest.Response := LRESTResponse;
LRESTRequest.SynchronizedEvents := False;
LRESTRequest.Execute;
Memo1.lines.text := LRESTResponse.Content;
finally
LRESTRequest.free;
end;
finally
LRESTResponse.free;
end;
finally
LRESTClient.free;
end;