Ticket Created
over 1 year ago

CIQQA-1662

Bug report: ConnectIQ Api & web request via GCM iOS is not passing http response as plain text

Hello ConnectIQ team,

I use makeWebRequest to proceed an auth process of an oAuth API, where I have to read an bearer token from the WebAPI.

The API responds the token as a JSON value type string. It's not possible to read that value as JSON dictionary. But with the GarminConnect app on a Android phone it's possible to use the parameter HTTP_RESPONSE_CONTENT_TYPE_TEXT_PLAIN to get the http response as plain text to read the bearer token from.

With the GCM app on a iPhone it's not possible. The ConectIQ API returns error code -400 independent of the response type parameter.

As it's not possible to read JSON values from a application/json response body, it's necessary to be able to read the body as plain text and parse it in the app. That's the only possibility to handle WebAPIs not following the ConnectIQ rules.

Please add the possibility of reading plain text responses using the makeWebRequest parameter HTTP_RESPONSE_CONTENT_TYPE_TEXT_PLAIN on iOS platform like on Android.

Many thanks. That will help many developers dealing with WebAPIs which are not completely compatible to the ConnectIQ rules.

Referenze thead with examples:

https://forums.garmin.com/developer/connect-iq/f/discussion/310015/webrequest-how-to-ignore-wrong-response-content-type#pifragment-1298=2

Kind regards

Ronny Winkler

Parents
  • Hello ,

    please prioritize this bugfix. It's a shame that the API can't work with simple JSON variables and even simple text is not allowed to make own reponse handler.

    I can't be the only one but surely other devs gave up before releasing their app.

    Should GarminConnect on the premium apple system be really that bad?

    Please don't leave us users alone!!!

    Kind regards
    Ronny
Comment
  • Hello ,

    please prioritize this bugfix. It's a shame that the API can't work with simple JSON variables and even simple text is not allowed to make own reponse handler.

    I can't be the only one but surely other devs gave up before releasing their app.

    Should GarminConnect on the premium apple system be really that bad?

    Please don't leave us users alone!!!

    Kind regards
    Ronny
Children
No Data