Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nova Engine ICS Overbyte #202

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ boss install github.com/viniciussanchez/RESTRequest4Delphi

## 🔰 Engines

By default, the components **TRESTRequest**, **TRESTResponse** and **TRESTClient** are used to make requests when your using Delphi. If you use Lazarus, the [**fphttpclient**](https://wiki.lazarus.freepascal.org/fphttpclient) components are used by default. The RESTRequest4Delphi has support to four engines to make requests: RESTClient, [**Synapse**](http://www.ararat.cz/synapse/doku.php/download), Indy and NetHTTP. You can change the engine to make requests. To do this, simply define in: *Project > Options > Delphi Compiler > Conditional defines* the compiler directive `RR4D_INDY`, `RR4D_SYNAPSE` or `RR4D_NETHTTP`
By default, the components **TRESTRequest**, **TRESTResponse** and **TRESTClient** are used to make requests when your using Delphi. If you use Lazarus, the [**fphttpclient**](https://wiki.lazarus.freepascal.org/fphttpclient) components are used by default. The RESTRequest4Delphi has support to five engines to make requests: RESTClient, [**Synapse**](http://www.ararat.cz/synapse/doku.php/download), [**ICS Overbyte**](https://wiki.overbyte.eu/wiki/index.php/ICS_Download), Indy and NetHTTP. You can change the engine to make requests. To do this, simply define in: *Project > Options > Delphi Compiler > Conditional defines* the compiler directive `RR4D_INDY`, `RR4D_SYNAPSE`, `RR4D_ICS` or `RR4D_NETHTTP`

**Note**: for Lazarus, the **fphttpclient** engine is the default. But you can switch to **Indy** setting `RR4D_INDY` directive or to [**Synapse**](http://www.ararat.cz/synapse/doku.php/download) setting `RR4D_SYNAPSE` directive.
**Note**: for Lazarus, the **fphttpclient** engine is the default. But you can switch to **Indy** setting `RR4D_INDY` directive or to [**Synapse**](http://www.ararat.cz/synapse/doku.php/download) setting `RR4D_SYNAPSE` directive. The ICS engine is only available for delphi

## 🔌 Adapters
Adapters allow you to extend the functionality of RESTREquest4Delphi without changing the core of the project. See the list of adapters available by the community:
Expand Down
9 changes: 7 additions & 2 deletions src/RESTRequest4D.Request.Contract.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface
{$IF NOT (DEFINED(RR4D_INDY) or DEFINED(FPC) or DEFINED(RR4D_NETHTTP))}
REST.Types,
{$ENDIF}
{$IF DEFINED(RR4D_ICS)} OverbyteIcsSslHttpRest, {$ENDIF}
{$IFDEF RR4D_INDY}
IdHTTP,
{$ENDIF}
Expand Down Expand Up @@ -72,7 +73,7 @@ interface
function Asynchronous(const AValue: Boolean): IRequest;
function SynchronizedEvents(const AValue: Boolean): IRequest;
{$ENDIF}
{$IF DEFINED(RR4D_INDY) or DEFINED(FPC) or DEFINED(RR4D_SYNAPSE) or DEFINED(RR4D_NETHTTP)}
{$IF DEFINED(RR4D_INDY) or DEFINED(FPC) or DEFINED(RR4D_SYNAPSE) or DEFINED(RR4D_NETHTTP) or DEFINED(RR4D_ICS)}
function AddParam(const AName, AValue: string): IRequest;
function AddBody(const AContent: string): IRequest; overload;
function AddHeader(const AName, AValue: string): IRequest;
Expand All @@ -99,15 +100,19 @@ interface
{$IF DEFINED(RR4D_INDY) or DEFINED(FPC) or DEFINED(RR4D_SYNAPSE) or DEFINED(RR4D_NETHTTP)}
function AddFile(const AFieldName: string; const AFileName: string; const AContentType: string = ''): IRequest; overload;
function AddFile(const AFieldName: string; const AValue: TStream; const AFileName: string = ''; const AContentType: string = ''): IRequest; overload;
{$ELSEIF DEFINED(RR4D_ICS)}
function AddFile(const AFileName: string; UploadStrat:THttpUploadStrat): IRequest; overload;
{$ELSE}
function AddFile(const AFieldName: string; const AFileName: string; const AContentType: TRESTContentType = TRESTContentType.ctNone): IRequest; overload;
function AddFile(const AFieldName: string; const AValue: TStream; const AFileName: string = ''; const AContentType: TRESTContentType = TRESTContentType.ctNone): IRequest; overload;
{$ENDIF}
function Proxy(const AServer, APassword, AUsername: string; const APort: Integer): IRequest;
function DeactivateProxy: IRequest;
{$IF DEFINED(RR4D_INDY)}
{$IF DEFINED(RR4D_INDY) or DEFINED(RR4D_ICS)}
function CertFile(const APath: string): IRequest;
function KeyFile(const APath: string): IRequest;
{$ENDIF}
{$IF DEFINED(RR4D_INDY)}
function HTTPOptions(const AHTTPOptions: TIdHTTPOptions): IRequest;
{$ENDIF}
end;
Expand Down
Loading