我需要将此信息发送到服务器:
Authorization SCToken 282518f3-95b90c08-9453-4cce-9a73-eb80cb7f86e1 this send like a HEADER
和这个
modify_after 2017-06-09T11:06:37Z like a QUERY
我这样做了:
public void getUpdate(String token , String lastModify, AsyncHttpResponseHandler handler){
syncHttpClient = new SyncHttpClient();
client.addHeader("Accept", "application/json");
syncHttpClient.addHeader("Accept", "application/json");
BasicHeader[] headers = new BasicHeader[]{new BasicHeader("Authorization", "SCToken " + token)};
Log.e("get ", token + " , " + getAbsoluteUrl("last_state/?modify_after=" + lastModify));
syncHttpClient.get(context, getAbsoluteUrl("last_state/?modify_after=" + lastModify), headers, null, handler);
}
但是作为服务器的答案,我得到了失败,状态是404。