Acknowledged
CIQQA-3210

Inconsistent handling of empty 200 OK responses between simulator and device (SDK 8.1.1, Epix 2 Pro)

I am using Communication.makeWebRequest to poll a REST API. The server appears to have an issue and intermittently returns an empty response instead of a JSON payload.

The response has HTTP/1.1 200 OK but includes Content-Length: 0.

In the simulator, this results in a responseCode of -400 (INVALID_HTTP_BODY_IN_NETWORK_RESPONSE).

However, on the actual watch, the responseCode is 200 and data is null.

I am using SDK 8.1.1 and testing on an Epix 2 Pro 47mm, both in the simulator and on the physical device.

The code for the app is available here: https://github.com/TheNinth7/ohg. Reproducing the issue requires access to a server that is protected by basic authentication. I'm happy to share the necessary credentials or details via direct message or another secure method to help reproduce the issue.

Parents Comment Children
  • Maybe it would be useful to set up a dummy endpoint, without authentication that returns empty body and a simple app with web request

    Yes, I'll try to reproduce it with Postman, from there I could setup a mock server.