I am using makeWebRequest with method Communications.HTTP_REQUEST_METHOD_GET and Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON to query a REST API.
A user reported that when using an iPhone X with iOS 16, they get a -202 error, INVALID_HTTP_METHOD_IN_REQUEST. The same user tried with the same watch but an iOS 18 device, and the error does not occur. They are using an Epix Pro Gen 2 51mm with latest software version 18.14 and the Connect app is also latest version 5.5.0.23. Together with the user we tried different endpoints for the request, one https, one http, both result in the same error when the iOS 16 device is used.
My personal setup is similar, same watch, same software versions and for me it works as well.
My app uses the latest SDK 7.3.0. My VS Code version is 1.92.2 with Monkey C extension 1.0.11.
function makeRequest() as Void {
var url = _siteConfig.getUrl() + "/api/state";
var options = {
:method => Communications.HTTP_REQUEST_METHOD_GET,
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
};
Communications.makeWebRequest( url, null, options, method(:onReceive) );
}
I already tried removing the :method part of the options and had the affected user test it, but the issue persists.
Unfortunately I do not have any other iOS 16 device to test, so I cannot be certain if it is really an issue with iOS 16 in general, or something more particular to the user's device. In any case, I believe this to be a device-specific bug, since the code follows the SDK documentation and works on other devices.