You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hpp/README.md
+73-7Lines changed: 73 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,11 @@
1
-
# 🌐 HttpProviderPlugin
1
+
# 🌐 Http Plugin (hpp)
2
+
3
+
The `hpp` module provides HTTP-related plugins for LinID. It currently includes:
4
+
5
+
-**HttpProviderPlugin**: A provider plugin for CRUD operations over HTTP REST APIs with response mapping into dynamic entities.
6
+
-**HttpTaskPlugin**: A task plugin for executing HTTP requests within task lifecycles.
7
+
8
+
## HttpProviderPlugin
2
9
3
10
The `HttpProviderPlugin` is a provider plugin designed to interact with configurable HTTP REST APIs, supporting full CRUD operations and response mapping into dynamic entities.
| `disabledRoutes` | ❌ | List of disabled actions for the entity (e.g., `patch`, `findAll`) |
@@ -113,7 +120,6 @@ entities:
113
120
| `result` | ❌ | Expression evaluated to verify success (e.g., for `delete`) |
114
121
| `page`, `size`, `total`, `itemsCount` | ❌ | Pagination info for `findAll`; mapping can use `index` for iterating items. |
115
122
116
-
117
123
Voici un encadré clair que tu peux insérer dans ton README pour indiquer que **PATCH n’est plus supporté** :
118
124
119
125
---
@@ -122,9 +128,9 @@ Voici un encadré clair que tu peux insérer dans ton README pour indiquer que *
122
128
123
129
The `HttpProviderPlugin` **does not support the PATCH method**.
124
130
125
-
* Any configuration or task using `PATCH` will **throw an exception** if invoked.
126
-
* Use `POST` for creation or `PUT` for updates instead.
127
-
* Ensure that `patch` is included in `disabledRoutes` for your entities to prevent accidental usage:
131
+
-Any configuration or task using `PATCH` will **throw an exception** if invoked.
132
+
-Use `POST` for creation or `PUT` for updates instead.
133
+
-Ensure that `patch` is included in `disabledRoutes` for your entities to prevent accidental usage:
128
134
129
135
```yaml
130
136
entities:
@@ -134,7 +140,7 @@ entities:
134
140
disabledRoutes: ['patch']
135
141
```
136
142
137
-
* If you previously relied on PATCH for partial updates, you should migrate your logic to use full `PUT` updates or a custom workflow.
143
+
-If you previously relied on PATCH for partial updates, you should migrate your logic to use full `PUT` updates or a custom workflow.
138
144
139
145
This explicitly prevents runtime errors and ensures consistency across all entity operations.
140
146
@@ -184,6 +190,66 @@ This `json-parsing` task (from the jptp plugin) converts raw HTTP responses into
184
190
185
191
---
186
192
193
+
## HttpTaskPlugin
194
+
195
+
The `HttpTaskPlugin` is a task plugin that executes HTTP requests defined in task configuration. It allows performing HTTP calls at any point in the task lifecycle.
196
+
197
+
### ✅ Use Case
198
+
199
+
Use this plugin when you need to:
200
+
201
+
- Execute an HTTP call as a side-effect during entity processing (e.g., notify an external system).
202
+
- Fetch data from an external API and store it in the execution context for subsequent tasks.
203
+
- Chain HTTP calls with other task plugins (e.g., `json-parsing`, `context-mapping`).
0 commit comments