当我去
我收到一个包含良好数据的 json。
IE
[
{
"url": "https://api.github.com/gists/5143977",
"forks_url": "https://api.github.com/gists/5143977/forks",
"commits_url": "https://api.github.com/gists/5143977/commits",
"id": "5143977",
etc.
但是,如果我使用此代码读取相同的地址:
String jsonString = null;
InputStream is = null;
HttpResponse response = null;
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("https://api.github.com/users/jkirkell/gists");
response = httpclient.execute(httppost);
}catch(Exception e){
throw e;
}
我收到这个 json 字符串:
{"message":"Not Found"}
我的代码有什么问题?