wing icon indicating copy to clipboard operation
wing copied to clipboard

`cloud.ApiRequest.body` is an empty string for GET requests

Open eladcon opened this issue 9 months ago • 5 comments

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.

eladcon avatar May 26 '24 14:05 eladcon