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
  • Hi ConnectIQ,

    I just bought a forerunner 965. One of your topline watches. This watch not able to connect to a popular smart home solution because it cant read JSON value from the iOS. 

    This is should be standard.

    when is this function added to the roadmap?

    regards Menne

Comment
  • Hi ConnectIQ,

    I just bought a forerunner 965. One of your topline watches. This watch not able to connect to a popular smart home solution because it cant read JSON value from the iOS. 

    This is should be standard.

    when is this function added to the roadmap?

    regards Menne

Children
No Data