at-internet / piano-analytics-apple

Piano Analytics Apple SDK repository
https://developers.atinternet-solutions.com/piano-analytics/
MIT License
7 stars 13 forks source link

Fix wrong content type #16

Closed HugoSay closed 1 year ago

HugoSay commented 1 year ago

fixes: #15

BenDz commented 1 year ago

Hi @HugoSay Thanks for your PR. As explained in our doc, the expected Content-Type is text/plain. Could you please change it? Thanks!

HugoSay commented 1 year ago

Hi,

Thank you for your response. However, I believe there might be a misunderstanding.

In actuality, the SDK is sending data in JSON format, which is further corroborated by the behavior of the Android SDK, which indeed sets the Content-Type to application/json.

I understand from the documentation that text/plain is the expected Content-Type, but from the behavior of both SDKs, it appears this may not be entirely accurate.

Based on my observations, it seems the backend may not be considering this header at all. This discrepancy only surfaces when setting another collection domain, leading to issues.

Given this, I would suggest that we consider updating the documentation to reflect this more accurately, as it could potentially lead to confusion and misconfiguration.