title: Kotlin & Retrofit: Simple POST without Response
body: <p>I'm trying to do a POST Request with Kotlin and Retrofit where I'm only interested in the statuscode of the request. Tutorials I have seen solve it all a bit different and most of the time they do not compile any more or are very complicated.</p>
  
  <p>Can someone help improving this code:?</p>
  
  <pre><code>interface ClientService {
  
          @POST("user/password-reset")
          fun passwortReset(@Query("email") email: String): Observable&lt;Result&gt;
  
          companion object {
              fun create(): ClientService {
  
                  val retrofit = Retrofit.Builder()
                          .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
                          .addConverterFactory(GsonConverterFactory.create())
                          .baseUrl("https://test-backend.myurl.com/api/")
                          .build()
  
                  return retrofit.create(ClientService::class.java)
              }
          } 
      }
  </code></pre>
  
  <p>I'm not sure how to call it and how to get the statuscode.</p>