fix(docs): correct wording in data input section for clarity

Former-commit-id: 55d6e2ac4d8b2ee36ee22bf8fd6debcd26cf0c49 [formerly 1270fe2df2e2a8ff97d700beff8ea6c6e91e99ca] [formerly 8e9590a5128dbdabddec66c1e8a5d20bd1d9cd7d [formerly 028b702bf93721a6f99c0965272139b1a5e944a3]]
Former-commit-id: 6827508d7873e7f5a81e32d187d98c0dbfb90f04 [formerly a6e5b859838efebec1e03edaa164154dc33b708d]
Former-commit-id: f904a9312173da4d0e0549938f56080836067508
This commit is contained in:
Melvin Chia
2025-09-08 11:25:44 +08:00
parent cd7ac8c9a7
commit 9e9b97b114

View File

@@ -168,7 +168,7 @@ Finally, in the routing file located at <code>src/core/routes/app.routes.ts</cod
<section id="data-input">
## Data Input
LifeForge's approach to taking data input is slightly different from tRPC, where there is only one channel for all the parameters. In LifeForge, the input is divided into two parts: <code>query</code>, <code>body</code>. Queries are basically the URL search parameters, the part after the <code>?</code> in the URL, while body is the request body, which is usually in JSON format or form data. For those who are familiar with RESTful APIs, these should be familiar concepts.
LifeForge's approach to taking data input is slightly different from tRPC, where there is only one channel for all the parameters. In LifeForge, the input is divided into two parts: <code>query</code> and <code>body</code>. Queries are basically the URL search parameters, the part after the <code>?</code> in the URL, while body is the request body, which is usually in JSON format or form data. For those who are familiar with RESTful APIs, these should be familiar concepts.
The division of input into query and body is based on the HTTP method used. For <code>GET</code> requests, only query parameters are accepted, while for <code>POST</code> requests, both query and body parameters are accepted. This design choice is made to adhere to the semantics of HTTP methods, where <code>GET</code> requests are meant for retrieving data and should not have a request body, while <code>POST</code> requests are meant for creating or updating data and can have a request body.