-
Notifications
You must be signed in to change notification settings - Fork 284
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
http.server: handle an empty Json body #2042
Conversation
name "tests" | ||
description "Receive an empty JSON body" | ||
dependency "vibe-d:http" path="../../" | ||
versions "VibeDefaultMain" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
|
||
import std.conv : to; | ||
|
||
shared static this() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void main()
assert(false, e.msg); | ||
} | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And perhaps runEventLoop()
before the end of main?
df956ea
to
d924091
Compare
(remove |
If
req.json
is called on an empty Json body, it throws an error message whichis rather hard to understand for the casual observer: