Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add @successCode UDA to return other 2XX codes #2021

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MartinNowak
Copy link
Contributor

No description provided.

res.writeBody(cast(ubyte[])null);
} else {
auto ret = () @trusted { return __traits(getMember, inst, Method)(params); } (); // TODO: remove after deprecation period

static if (!__traits(compiles, () @safe { evaluateOutputModifiers!Func(ret, req, res); } ()))
static if (!__traits(compiles, () @safe { evaluateOutputModifiers!CFunc(ret, req, res); } ()))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a drive-by to match the actual invocation below.

@MartinNowak MartinNowak force-pushed the success_code branch 2 times, most recently from e6c0443 to 1939c47 Compare December 30, 2017 00:16
@MartinNowak
Copy link
Contributor Author

Not too certain whether a status = code solution like for vibe.web.web would be better.
Definitely still need some plain (req, res) to deal with endpoints returning either 204 or 201.
Also optional void returns (204) aren't really supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant