It is a background webrequest.
Looking at the http traffic logs on the simulator, it seems to work fine in communicating and receiving data.
But in eclipse (and on the watch face) I do not receive the data.
I get this error: Background: Communication Error Code: -400 but in the http logs it is 200.
So I assume is something in the way data are parsed.
It worked with just
{:responseType => Comm.HTTP_RESPONSE_CONTENT_TYPE_JSON }
Now it doesn't anymore.
This is the response I get from the http logs:
In the header:
HTTP/1.1 200 OK\r\n
In the body:
37c\r\n{"status":200,"callCount":1,"copyright":"Tidal data retrieved from www.worldtide.info. Copyright (c) 2014-2017 Brainware LLC. Licensed for use of individual spatial coordinates on behalf of\\/by an end-user. Copyright (c) 2010-2016 Oregon State University. Licensed for individual spatial coordinates via ModEM-Geophysics Inc. NO GUARANTEES ARE MADE ABOUT THE CORRECTNESS OF THIS DATA. You may not use it if anyone or anything could come to harm as a result of using it (e.g. for navigational purposes).","requestLat":9.98,"requestLon":-85.64,"responseLat":10,"responseLon":-85.6667,"atlas":"TPXO_8_v1","requestDatum":"MLLW","responseDatum":"MLLW","extremes":[{"dt":1544482804,"date":"2018-12-10T23:00+0000","height":1.863,"type":"High"},{"dt":1544504290,"date":"2018-12-11T04:58+0000","height":0.17,"type":"Low"},{"dt":1544526199,"date":"2018-12-11T11:03+0000","height":1.951,"type":"High"}]}\r\n0\r\n\r\n
Any help it is greatly appreciated.