Created
May 5, 2020 19:51
-
-
Save ozcankrks/b15b9d8556b4a960b0fd4a8f4d15259d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public String GetJsonData(String _url) throws IOException | |
| { | |
| StringBuilder sb = new StringBuilder(); | |
| URL uri = new URL(_url); // Veri urlniz | |
| HttpURLConnection urlConnection = (HttpURLConnection) uri.openConnection(); | |
| try { | |
| InputStream in = new BufferedInputStream(urlConnection.getInputStream()); | |
| BufferedReader bin = new BufferedReader(new InputStreamReader(in)); | |
| String inputLine; | |
| while ((inputLine = bin.readLine())!= null) | |
| { | |
| sb.append(inputLine); | |
| } | |
| } | |
| finally | |
| { | |
| urlConnection.disconnect(); | |
| } | |
| Log.d("çıktı",sb.toString()); | |
| return sb.toString(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment