google-developer-training / basic-android-kotlin-compose-training-mars-photos

Solution code for Android Basics in Kotlin course
https://developer.android.com/courses/android-basics-kotlin/course?gclid=CjwKCAjw4c-ZBhAEEiwAZ105RTyT-iaLHzrhMBUXdMhO230ZDwOwxxI2x4RgK8DwBxK8t1h0wmU_QxoCi4YQAvD_BwE
Apache License 2.0
66 stars 58 forks source link

Get Data from the Internet #21

Closed folsze closed 1 year ago

folsze commented 1 year ago

Subsection Number 8: .addConverterFactory(Json.asConverterFactory("application/json".toMediaType()))

marked as red because:

https://stackoverflow.com/questions/57358023/okhttp3-in-kotlin-string-mediatype-does-not-work

So the 2020 answer from Stackoverflow is missing as a task, before the said task

osuleymanova commented 1 year ago

Hello @folsze,

Thank you for reaching out to us and sharing your feedback. The code block is updated, it should be .addConverterFactory(Json.asConverterFactory(MediaType.get("application/json"))):

Screenshot 2023-01-04 at 8 46 32 AM