snowplow / snowplow-java-tracker

Snowplow event tracker for Java. Add analytics to your Java desktop and server apps, servlets and games. (See also: snowplow-android-tracker)
http://snowplowanalytics.com
Apache License 2.0
23 stars 36 forks source link

Upgraded okhttp dependency has breaking change. #365

Closed fathimaSheikh closed 7 months ago

fathimaSheikh commented 11 months ago

Describe the bug With 4.10 version of okhttp, there's a breaking change with use of function RequestBody.create(payload, JSON). It's changed to RequestBody.create(JSON, payload)

Expect Would be great to have the dependency updated and fix complier issue.

Version Works with version 4.9.3 Compiler errors with version 4.10

Screenshot 2023-10-09 at 5 02 10 PM

complete the following information):**

matus-tomlein commented 8 months ago

Hi @fathimaSheikh, thank you for the report!

We will definitely update the okhttp dependency to the latest version (4.12), but I am confused about the problem because according to the okhttp code the correct order of the arguments in RequestBody.create() is to put the content first and then the content type, see here. The other order (content type first) that you suggest is deprecated.