title: Unable to successfully send a POST request using Retrofit 2.6.1 - Problems with JSON coverter
body: <p>I am using the new Retrofit2 with suspending coroutines, and with GET requests everything works fine. </p>
  
  <p>But I now have to implement a POST request, and just can't get it to work</p>
  
  <p>I have a CURL example that looks like this:
   <code>curl -X POST -H "Content-Type: application/json;charsets: utf-8" -d '{"tx_guapptokenlist_tokenitem":{"tokenchar":"my-token-string","platform":"android"}}' https://www.example-url.com/tokens?type=56427890283537921</code></p>
  
  <p>This works fine, and returns this response: <code>{"errors":false,"success":true}%</code> </p>
  
  <p>So here's what my request looks like in my Api class right now:</p>
  
  <pre><code>    @Headers( "Content-Type: application/json" )
      @POST("/tokens?type=56427890283537921")
      suspend fun sendFirebaseToken(@Body tokenRequest: RequestBody) : Call&lt;TokenResponse&gt;
  </code></pre>
  
  <p>This is my TokenResponse class: </p>
  
  <pre><code>@JsonClass(generateAdapter = true)
  data class TokenResponse(
      @Json(name="errors")
      val errors: Boolean,
      @Json(name="success")
      val success: Boolean)
  </code></pre>
  
  <p>and the ApiClient class I'm using:</p>
  
  <pre><code>object ApiClient {
  
      private const val BASE_URL = "https://myExampleUrl.com"
      private var retrofit: Retrofit? = null
  
      var moshi = Moshi.Builder().add(KotlinJsonAdapterFactory()).build()
      val client: Retrofit?
          get() {
              if (retrofit == null) {
                  retrofit = Retrofit.Builder().baseUrl(
                      BASE_URL
                  ).client(getOkHttpClient())
                      .addConverterFactory(MoshiConverterFactory.create())
                      .build()
              }
              return retrofit
          }
  
      fun getOkHttpClient(): OkHttpClient {
          return OkHttpClient.Builder().addInterceptor(getLoggingInterceptor())
              .connectTimeout(120, TimeUnit.SECONDS)
              .readTimeout(120, TimeUnit.SECONDS).writeTimeout(90, TimeUnit.SECONDS).build()
      }
  
      private fun getLoggingInterceptor(): HttpLoggingInterceptor {
          return HttpLoggingInterceptor().setLevel(
              if (BuildConfig.DEBUG) HttpLoggingInterceptor.Level.HEADERS
              else HttpLoggingInterceptor.Level.NONE
          )
      }
  }
  </code></pre>
  
  <p>The first odd thing I noticed: Even with the <code>@POST</code> annotation, if my <code>suspend fun</code> has no return type, I get no error, but okhttp will always send a GET request (at least the endpoint always receives a GET). Not sure if that is supposed to be like that?</p>
  
  <p>Anyway: I need the return values, so I'm returning <code>Call&lt;TokenResponse&gt;</code>.
  This leads me to my main problem, that I can't solve: If now I execute my code, it crashes with this log:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Unable to create converter for     retrofit2.Call&lt;myapp.communication.TokenResponse&gt;
          for method TokenApi.sendToken
          at retrofit2.Utils.methodError(Utils.java:52)
  </code></pre>
  
  <p>To try and deal with this I have used moshi-kotlin-codegen to generate the proper adapter (hence the annotations in the data class), but to no avail. The class is generated, but not used. I have tried to pass a Moshi with JsonAdapterFactory like this <code>var moshi = Moshi.Builder().add(KotlinJsonAdapterFactory()).build()</code>to my ConverterFactory but that doesn't work either.
  Tried to add the generated adapter maually to moshi but that also did not work.</p>
  
  <p>I've also tried returning different types in my request. The Retrofit docs state that without a converter one could only return a <code>ResponseBody</code>, but same result: Retrofit complains it has no converter. The same for returning <code>Call&lt;Void&gt;</code></p>
  
  <p>I feel like I'm missing something here? Who can help? Happy to provide more details, please request what's needed.</p>