mcxiaoke / android-volley

DEPRECATED
4.29k stars 1.56k forks source link

HTTP response is different from the response in the browser android? #100

Open amaydiam opened 9 years ago

amaydiam commented 9 years ago

i have problem with my rest. I use Volley library, but the results different from the response in the browser android ?

this is, ther URL =

https://assac.com/profilepicture?app_key=bpHANRATGW35hkHNMJA9ssMOnLog9l7l3IxXDGiv&session_key=LSDK4ARF0w8flNc8GCj8mvvKdctKnN68FKSKlKplhyAClNK2&page=1&limit=10

and this format in java

String url = Variabel.URL_PHOTO_PROFILE + "?app_key=" + URLEncoder.encode(Variabel.app_key) + "&session_key=" + URLEncoder.encode(session_key)
                + "&page=" + String.valueOf(Variabel.page) + "&limit="
                + Variabel.LIMIT_DATA;

the result from java is :

{
  "isSuccess": true,
  "message": "ok",
  "pageCurrent": "1",
  "pageTotal": 1,
  "itemsTotal": 2,
  "memberProfilePictures": [
    {
      "photoMemberId": "O6lXnljaVabh55dd08c87b59c55dd08c87b64255dd08c87b6e4e5cAv",
      "photoMemberIdMember": "LWC6MZOgIZxB559c5af5ca70c559c5af5ca7b2559c5af5ca855TiMPZ",
      "photoMemberStatus": 1,
      "photoMemberURL": "https://assac.com/public/uploads/pictures/2015_08_26/1440549064367_medium.png",
      "photoMemberURLLarge": "https://assac.com/public/uploads/pictures/2015_08_26/1440549064367_large.png",
      "photoMemberWidth": 480,
      "photoMemberHeight": 700
    },
    {
      "photoMemberId": "QNRiYnQKk8V755d931c44efcd55d931c44f07155d931c44f11efffVd",
      "photoMemberIdMember": "LWC6MZOgIZxB559c5af5ca70c559c5af5ca7b2559c5af5ca855TiMPZ",
      "photoMemberStatus": 0,
      "photoMemberURL": "https://assac.com/public/uploads/pictures/2015_08_23/14402974122618_medium.jpeg",
      "photoMemberURLLarge": "https://assac.com/public/uploads/pictures/2015_08_23/14402974122618_large.jpeg",
      "photoMemberWidth": 480,
      "photoMemberHeight": 269
    }
  ]
}

but result from browser is :

{
  "isSuccess": true,
  "message": "ok",
  "pageCurrent": "1",
  "pageTotal": 1,
  "itemsTotal": 4,
  "memberProfilePictures": [
    {
      "photoMemberId": "kmz9RnqQmi2I55f7bc9eb023955f7bc9eb02df55f7bc9eb0381v2PqG",
      "photoMemberIdMember": "LWC6MZOgIZxB559c5af5ca70c559c5af5ca7b2559c5af5ca855TiMPZ",
      "photoMemberStatus": 0,
      "photoMemberURL": "https://assac.com/public/uploads/pictures/2015_09_15/14422990385762_medium.jpeg",
      "photoMemberURLLarge": "https://assac.com/public/uploads/pictures/2015_09_15/14422990385762_large.jpeg",
      "photoMemberWidth": 480,
      "photoMemberHeight": 640
    },
    {
      "photoMemberId": "O6lXnljaVabh55dd08c87b59c55dd08c87b64255dd08c87b6e4e5cAv",
      "photoMemberIdMember": "LWC6MZOgIZxB559c5af5ca70c559c5af5ca7b2559c5af5ca855TiMPZ",
      "photoMemberStatus": 1,
      "photoMemberURL": "https://assac.com/public/uploads/pictures/2015_08_26/1440549064367_medium.png",
      "photoMemberURLLarge": "https://assac.com/public/uploads/pictures/2015_08_26/1440549064367_large.png",
      "photoMemberWidth": 480,
      "photoMemberHeight": 700
    },
    {
      "photoMemberId": "QNRiYnQKk8V755d931c44efcd55d931c44f07155d931c44f11efffVd",
      "photoMemberIdMember": "LWC6MZOgIZxB559c5af5ca70c559c5af5ca7b2559c5af5ca855TiMPZ",
      "photoMemberStatus": 0,
      "photoMemberURL": "https://assac.com/public/uploads/pictures/2015_08_23/14402974122618_medium.jpeg",
      "photoMemberURLLarge": "https://assac.com/public/uploads/pictures/2015_08_23/14402974122618_large.jpeg",
      "photoMemberWidth": 480,
      "photoMemberHeight": 269
    },
    {
      "photoMemberId": "WwJHWP9ZQWhr55f7bc849ecec55f7bc849ed9055f7bc849ee41P6Ebd",
      "photoMemberIdMember": "LWC6MZOgIZxB559c5af5ca70c559c5af5ca7b2559c5af5ca855TiMPZ",
      "photoMemberStatus": 0,
      "photoMemberURL": "https://assac.com/public/uploads/pictures/2015_09_15/14422990125018_medium.jpeg",
      "photoMemberURLLarge": "https://assac.com/public/uploads/pictures/2015_09_15/14422990125018_large.jpeg",
      "photoMemberWidth": 480,
      "photoMemberHeight": 853
    }
  ]
}

so how to fix it ?