Retrofit2 - 406 Not Acceptable
<p>When I use <strong>postman</strong> to communicate with the endpoint it's work fine but with <strong>Retrofit2</strong> I get <code>406 Not Acceptable</code> message as shown in the <em>LogCat</em>. I found some related questions in SO I tried the accepted answer solution <em>(add the content type in the header)</em> but doesn't work for me</p>

<p><strong>Retrofit Config</strong></p>

<pre><code>public interface AndroidAppService {
....
@Headers({
      "Content-Type: text/html; charset=UTF-8" // I also tried application/json
  }) @GET("subscribers/{msisdn}/verify") Observable&lt;HeaderResponse&gt; checkPhoneNumber(
      @Path("msisdn") String phoneNumber);
....
class Factory {
public static AndroidAppService create(String baseUrl) {

  HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
  interceptor.setLevel(HttpLoggingInterceptor.Level.HEADERS);
  OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build();

  Retrofit retrofit = new Retrofit.Builder().baseUrl(baseUrl)
      .client(client)
      .addConverterFactory(GsonConverterFactory.create())
      .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
      .build();
  return retrofit.create(AndroidAppService.class);
  }
 } 
}
</code></pre>

<p><strong>LogCat</strong></p>

<pre><code>08-13 18:59:02.376 17766-22236/com.androidapp D/OkHttp: --&gt; GET http://androidapp.net/bo/web/app_dev.php/api/subscribers/0827873/verify http/1.1
08-13 18:59:02.376 17766-22236/com.androidapp D/OkHttp: --&gt; END GET

08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: &lt;-- 406 Not Acceptable http://com.androidapp.com
/bo/web/app_dev.php/api/subscribers/072736263/verify (10680ms)
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: Date: Sat, 13 Aug 2016 18:58:07 GMT
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: Server: Apache/2.4.7 (Ubuntu)
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: X-Powered-By: PHP/5.5.9-1ubuntu4.14
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: Cache-Control: no-cache
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: X-Debug-Token: d28d0a
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: X-Debug-Token-Link: http://com.androidapp/bo/web/app_dev.php/_profiler/d28d0a
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: Keep-Alive: timeout=5, max=100
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: Connection: Keep-Alive
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: Transfer-Encoding: chunked
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: Content-Type: text/html; charset=UTF-8
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: OkHttp-Sent-Millis: 1471113729149
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: OkHttp-Received-Millis: 1471113729517
08-13 18:42:09.512 6350-6927/com.androidapp D/OkHttp: &lt;-- END HTTP
</code></pre>