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
Hey I am just getting started with vibe.d, however I am struggling with this issue.
Let's say I have a more complex FooObject that my API expects. Is there an easy way to teach the REST API to accept a request body that is the entire object like {"a": "foo", "b": "bar"} for the example below?
In other words I would like to serialize the body into one attribute.
I know that best practices, but this is possible in most REST frameworks I have worked with and the still the default setting for most JS REST libs.
struct FooObject{
string a;
string b;
}
interface Example4API
{
int createFoo(FooObject whole_body);
}
class Example4 : Example4API
{
override:
int createFoo(FooObject whole_body){
return 1;
}
}
The text was updated successfully, but these errors were encountered:
Hey I am just getting started with vibe.d, however I am struggling with this issue.
Let's say I have a more complex
FooObject
that my API expects. Is there an easy way to teach the REST API to accept a request body that is the entire object like{"a": "foo", "b": "bar"}
for the example below?In other words I would like to serialize the body into one attribute.
I know that best practices, but this is possible in most REST frameworks I have worked with and the still the default setting for most JS REST libs.
The text was updated successfully, but these errors were encountered: