diff --git a/src/core/RESTRequest4D.Request.pas b/src/core/RESTRequest4D.Request.pas index c809b23..5a151f6 100644 --- a/src/core/RESTRequest4D.Request.pas +++ b/src/core/RESTRequest4D.Request.pas @@ -51,7 +51,8 @@ TRequest = class(TInterfacedObject, IRequest) function ExecuteAsync(ACompletionHandler: TProc = nil; ASynchronized: Boolean = True; AFreeThread: Boolean = True; ACompletionHandlerWithError: TProc = nil): TRESTExecutionThread; public - constructor Create(const AMethod: TRESTRequestMethod = rmGET; const ABaseURL: string = ''; const AToken: string = ''); + constructor Create(const ABaseURL: string; const AToken: string = ''); overload; + constructor Create(const AMethod: TRESTRequestMethod = rmGET; const ABaseURL: string = ''; const AToken: string = ''); overload; destructor Destroy; override; end; @@ -98,6 +99,11 @@ function TRequest.Body: IRequestBody; Result := FBody; end; +constructor TRequest.Create(const ABaseURL, AToken: string); +begin + Create(rmGET, ABaseURL, AToken); +end; + constructor TRequest.Create(const AMethod: TRESTRequestMethod = rmGET; const ABaseURL: string = ''; const AToken: string = ''); begin FRESTResponse := TRESTResponse.Create(nil);