We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.POST('') async stuff(body: HttpBody<string[]>) {
Debugger shows: This route has no body defined.
Sending data results in a Validation error:
{ "message": "Validation error:\n(type): Not an array", "errors": [ { "path": "", "code": "type", "message": "Not an array" } ] }
If it's not intended to use arrays with HttpBody a remark in the docs might be good.
The text was updated successfully, but these errors were encountered:
What's the request's body and header?
Sorry, something went wrong.
I stumbled across this problem again and found my own bugreport :-)
@http.POST('/example') async example(exampleDtoList: HttpBody<ExampleDto[]>) {
HttpBody validation fails:
I checked and it is clearly a json array transported with Content-Type: application/json
Workaround:
@http.POST('/example') async example(request: HttpRequest) { const body = await request.readBodyText() const exampleDtoList = deserialize<ExampleDto[]>(JSON.parse(body));
version 1.0.1-alpha.97
No branches or pull requests
Debugger shows: This route has no body defined.
Sending data results in a Validation error:
If it's not intended to use arrays with HttpBody a remark in the docs might be good.
The text was updated successfully, but these errors were encountered: