当我尝试从Google地方照片API解析图片时,为什么会出现500内部服务器错误?

时间:2017-06-04 17:26:38

标签: android api http google-api

当我尝试从ResponseCOde进行连接时,我的HttpUrlConnection等于500:

 try {
            urlConnection = (HttpURLConnection) url.openConnection();
            urlConnection.setRequestMethod("GET");
            urlConnection.connect();


            if (urlConnection.getResponseCode() == 200) {
                Log.d("QueryUtils","connected");
                inputStream = urlConnection.getInputStream();
                Log.d("QueryUtils","input stream is ours");
                jsonResponse = readFromStream(inputStream);
            } else {
                Log.e("MainActivity", "Error Response Code: " + urlConnection.getResponseCode());
            }

请注意,我可以从我的网络浏览器成功建立连接..但在我的Android应用程序中,我收到500内部服务器错误

0 个答案:

没有答案