`cloud.ApiRequest.body` is an empty string for GET requests
I tried this:
bring cloud;
bring http;
let api = new cloud.Api();
api.get("/", inflight (r) => {
if let body = r.body {
return {
status: 500
};
} else {
return {
status: 200
};
}
});
test "" {
let res = http.get(api.url);
assert(res.status == 200);
}
This happened:
assertion failed: res.status == 200
I expected this:
No response
Is there a workaround?
No response
Anything else?
No response
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Community Notes
- Please vote by adding a 👍 reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.
+1
Congrats! :rocket: This was released in Wing 0.74.20.
It seems that AWS is treating both empty strings body and no body as the same - null body. Do we want to match this behavior? I'm not sure what's happening in other cloud providers.
Since this is currently not blocking any user, I've lowered the priority to p3
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!