I'm trying to get my simple app working on Android 2.3.4 - gingerbread. The first request I make to the server is for authentication. For making requests I am using RetroFit.
However, I'm getting the error below when trying to make a request from a phone that has gingerbread on it.
05-09 16:21:44.724 4706-4734/com.myapp.mobile D/Retrofit﹕ <--- HTTP 400 https://myserver.com/myservice/user/signin (2318ms)
05-09 16:21:44.740 4706-4734/com.myapp.mobile D/Retrofit﹕ <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at localhost Port 443</address>
</body></html>
The request I'm making is this:
@GET("/user/signin")
@Headers({"Content-type: application/json"})
User signin(@Header("Authorization") String value);
I'm building the adapter like this:
private final RestAdapter REST_ADAPTER = new RestAdapter.Builder()
.setServer(API_URL)
.setLogLevel(RestAdapter.LogLevel.FULL)
.build();
private final MyTaskService MY_SERVICE = REST_ADAPTER.create(MyTaskService.class);
The same code base works perfectly fine on a newer API (I've tried API 15+).
Is there any reason why the Authorization
request would fail on gingerbread?