Re: vibe-d REST API: POSTing a struct

2023-12-17 Thread bomat via Digitalmars-d-learn
On Friday, 15 December 2023 at 07:36:04 UTC, aj_dlang wrote: does it active? If you mean if that vibe-d forum is still active, I don't know. I tried to register, but I never got a confirmation mail... so probably not. On the other hand, there wasn't a response to my question on this board

Re: vibe-d REST API: POSTing a struct

2023-12-14 Thread aj_dlang via Digitalmars-d-learn
On Saturday, 2 December 2023 at 12:39:01 UTC, bomat wrote: On Friday, 1 December 2023 at 19:18:19 UTC, bomat wrote: So my question is, is it possible to have vibe-d parse the request body into a struct "implicitly"? I'm gonna answer my own question here, it's `@bodyParam`.

Re: vibe-d REST API: POSTing a struct

2023-12-02 Thread bomat via Digitalmars-d-learn
On Friday, 1 December 2023 at 19:18:19 UTC, bomat wrote: So my question is, is it possible to have vibe-d parse the request body into a struct "implicitly"? I'm gonna answer my own question here, it's `@bodyParam`. https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/40001/

vibe-d REST API: POSTing a struct

2023-12-01 Thread bomat via Digitalmars-d-learn
Hey everyone, I'm looking into vibe-d, particularly how to build a REST API server. Given this struct: ``` struct Project { string project_id; string name; } ``` I could write a GETter like this: ``` @path("projects/:project_id") Project getProject(string _project_id); ``` and a POST