Configuring Retrofit

Of course, Retrofit can just deserialize HTTP bodies into OkHttp's ResponseBody type and it can acknowledge its RequestBody type for @Body.

Converters can be added in order to support different sorts. Seven kinds of modules adjust mainstream serialization libraries for your benefit. These include the following libraries:

  • Gson: com.squareup.retrofit2:converter-gson
  • Jackson: com.squareup.retrofit2:converter-jackson
  • Moshi: com.squareup.retrofit2:converter-moshi
  • Protobuf: com.squareup.retrofit2:converter-protobuf
  • Wirecom.squareup.retrofit2:converter-wire
  • Simple XML: com.squareup.retrofit2:converter-simplexml
  • Scalars (primitives, boxed, and String): com.squareup.retrofit2:converter-scalars
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.131.47