Workingn with web requests

Hi guys,

I am currently working on an Watch App that retrieves data from a webservice in json format. This works pretty fine, but I have questions/issues where I need some clarification:

HTTPS: the webservice I am using for development does not provide https. To make it work in the simulator I have to deactivate the option ""Use device HTTPS requirements". I am not really sure what that means. Does it mean that when pushing the app to a device it won't work until and unless a HTTPS service url is provided? What if I want to support also HTTP? Is there a setting on the device like in simulator to deactivate this limitation?

JSON: responses from my rest service are always providing data in JSON format. Sometimes, when I have a lot of objects to load, the simulator shows error code "-403", which means that something ran out of memory. The strange thing is that this does not happen always but only sometimes with the same request. The response at this time has a size of about 2,7 KB, which seems not much to me, so the question is why am I seeing this error? What is the particular limit of a JSON response that can be handled? Does this depend on the device memory or is there a general limit?

I am currently using a Fenix 5, here is a dump of the memory logger of the simulator:

memory before request: memory1.png
memory after request: memory2.png

Thanks for the help!

Bye

P.S. I have issues uploading images/attachments to the post. Is there anything I need to know? Tried to upload 2 png files and one zip as attachment. I get error "Invalid file" in all cases.

P.P.S I have uploaded the file here: https://www.file-upload.net/download-13049367/memory.zip.html
  • Until now I have tested the app only in the simulator, and there the request is of course fast. I was hoping you might have some experience with that and are able to tell me. Will have to test it.
  • I have now tested the app on the watch and the requests are processed fast enough to load only the necessary portions of the data.

    Also working with a webserver that has a "letsencrypt" certificate is possible without issues. The only thing you have to take care of is to load the fullchain.pem to have also the intermediate certificate available.

    Thanks for your help!

    Bye
  • One more question related to the HTTPS: what about self signed certificates? Are those sufficient to make successful requests from Garmin devices? I have tried to to do that but it seems those are blocked. What are the minimal requirements for a web request?

    Thanks!

    Bye
  • I've not run into this myself, but I do seem to recall, it's got to be a certificate from a known signing authority, and somewhere in this forum those are mentioned, including where you can get one for free..