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

Incorrect Content-Type in SDK Requests #15

Closed HugoSay closed 1 year ago

HugoSay commented 1 year ago

I have observed that the SDK is currently sending requests with an inappropriate content-type:

Content-Type: application/x-www-form-urlencoded

However, the payload data is in JSON format.

Expected Behavior

I would expect that the content-type for such requests should be:

Content-Type: application/json

Current Behavior

The SDK is incorrectly specifying the content-type as application/x-www-form-urlencoded for JSON payloads.

Steps to Reproduce

Initiate a request through the SDK (provide the specific function or method used, if applicable) Observe the outgoing headers Possible Solution

Ensure the correct content-type (application/json) is set for requests with a JSON payload.

Additional Context

Please let me know if this is a known issue, or if it's something that needs to be adjusted on our end. I would be glad to provide more information if required.