I recently deployed a new Bun API on V2 with App Sleep, and I've noticed that the first request to a sleeping app always returns an empty response. This hasn't happened on non-V2 Bun apps with App Sleep on.
The following are tests with curl using the same URL/endpoint.
Normal request (non-sleeping app, {"status": "OK"} is the response from my API):
HTTP/2 200
content-type: application/json;charset=utf-8
date: Thu, 04 Jul 2024 06:03:09 GMT
server: railway-edge
x-request-id: 56xHFuw3QlCDX-2Zclvhkw_3165824431
content-length: 15
{"status":"OK"}
real 0m0.269s
user 0m0.016s
sys 0m0.000s
First request on the same app but sleeping:
HTTP/2 200
server: railway-edge
x-request-id: Z4G6GgaAQziEbf20vOO_UQ_3165824431
content-length: 0
date: Thu, 04 Jul 2024 06:02:56 GMT
real 0m1.275s
user 0m0.000s
sys 0m0.000s
Project ID: 34304961-2ebf-4d0b-b2ae-3585cf6b9353
/j