Releases: andeerc/REST4D
Releases · andeerc/REST4D
Release list
v1.4
v1.3
- Added authentication OAuth2
Sample:
TREST4D.New
.OAuth2
.AuthorizationEndpoint('http://localhost:4000/')
.AccessTokenEndpoint('auth')
.ClientID('username')
.ClientSecret('******')
.&End
.OnAuthenticate(
procedure(AJson: String)
var
jv: TJSONValue;
begin
jv := TJSONObject.ParseJSONValue(AJson);
try
jv.TryGetValue('acess_token', FToken);
finally
jv.DisposeOf;
end;
end)
.OnAuthenticateRaiseException(
procedure(E: Exception)
begin
raise Exception.Create(E.Message);
end)
.Authenticate
.BaseUrl('http://localhost:4000/')
.Resource('ping')
.Bearer(FTOken)
.Post()
- Added TimeOut function in IRESTRequest