Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciussanchez committed May 30, 2023
1 parent 5404705 commit fd07c11
Show file tree
Hide file tree
Showing 16 changed files with 316 additions and 618 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

## ⚙️ Installation

*Prerequisites*: [**DataSet-Serialize**](https://github.com/viniciussanchez/dataset-serialize) - This is a DataSet serializer for Delphi

* **Manual installation**: Add the following folders to your project, in *Project > Options > Resource Compiler > Directories and Conditionals > Include file search path*

```
Expand All @@ -34,6 +32,10 @@ By default, the components **TRESTRequest**, **TRESTResponse** and **TRESTClient

**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.

## 🔌 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:
* [**DataSet-Serialize**](https://github.com/viniciussanchez/dataset-serialize-adapter-restrequest4delphi) - Adapter to load a DataSet using the DataSet-Serialize library at the time of the request;

## ⚡️ Quickstart

You need to use RESTRequest4D
Expand All @@ -58,13 +60,13 @@ begin
end;
```

* **GET AS DATASET**
* **GET AS DATASET USING ADAPTERS**

```pascal
begin
TRequest.New.BaseURL('http://localhost:8888/users')
.Adapters(TDataSetSerializeAdapter.New(FDMemTable))
.Accept('application/json')
.DataSetAdapter(FDMemTable)
.Get;
end;
```
Expand Down Expand Up @@ -141,4 +143,4 @@ node server.js

## ⚠️ License

`RESTRequest4Delphi` is free and open-source software licensed under the [MIT License](https://github.com/viniciussanchez/RESTRequest4Delphi/blob/master/LICENSE).
`RESTRequest4Delphi` is free and open-source software licensed under the [MIT License](https://github.com/viniciussanchez/RESTRequest4Delphi/blob/master/LICENSE).
13 changes: 2 additions & 11 deletions boss-lock.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{
"hash": "cdbb70a8679a51d4358a9e31e1ef566a",
"updated": "2021-03-24T15:27:46.0150426-03:00",
"installedModules": {
"github.com/viniciussanchez/dataset-serialize": {
"name": "dataset-serialize",
"version": "v2.4.9",
"hash": "0df5fa71a508ce66a50ef649231af9c9",
"artifacts": {},
"failed": false,
"changed": false
}
}
"updated": "2023-05-30T14:30:59.2446954-03:00",
"installedModules": {}
}
4 changes: 1 addition & 3 deletions boss.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
"homepage": "",
"mainsrc": "src",
"projects": [],
"dependencies": {
"github.com/viniciussanchez/dataset-serialize": "^v2.2.9"
}
"dependencies": {}
}
6 changes: 6 additions & 0 deletions samples/client/delphi/Samples.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@
</Delphi.Personality>
<Deployment Version="4">
<DeployFile LocalName="Bin\Samples.exe" Configuration="Debug" Class="ProjectOutput"/>
<DeployFile LocalName="Bin\Samples.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>Samples.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
Expand Down
11 changes: 11 additions & 0 deletions samples/client/delphi/src/Samples.Main.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -10809,4 +10809,15 @@ object FrmMain: TFrmMain
end
end
end
object FDMemTable1: TFDMemTable
FetchOptions.AssignedValues = [evMode]
FetchOptions.Mode = fmAll
ResourceOptions.AssignedValues = [rvSilentMode]
ResourceOptions.SilentMode = True
UpdateOptions.AssignedValues = [uvCheckRequired, uvAutoCommitUpdates]
UpdateOptions.CheckRequired = False
UpdateOptions.AutoCommitUpdates = True
Left = 464
Top = 392
end
end
1 change: 1 addition & 0 deletions samples/client/delphi/src/Samples.Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ TFrmMain = class(TForm)
Panel8: TPanel;
lblRESTRequest4DelphiComponent: TLabel;
btnMultipartFormDataPut: TButton;
FDMemTable1: TFDMemTable;
procedure btnGETClick(Sender: TObject);
procedure btnPOSTClick(Sender: TObject);
procedure btnPUTClick(Sender: TObject);
Expand Down
Loading

0 comments on commit fd07c11

Please sign in to comment.