| ... | ... | @@ -100,9 +100,9 @@ public class RestClient { |
|
|
|
URL url = new URL(SERVER+endpoint);
|
|
|
|
URLConnection connection = url.openConnection();
|
|
|
|
HttpURLConnection httpConnection = (HttpURLConnection)connection;
|
|
|
|
connection.setRequestProperty("Content-Type", "application/json");
|
|
|
|
httpConnection.setRequestProperty("Content-Type", "application/json");
|
|
|
|
|
|
|
|
InputStream response = connection.getInputStream();
|
|
|
|
InputStream response = httpConnection.getInputStream();
|
|
|
|
int responseCode = httpConnection.getResponseCode();
|
|
|
|
|
|
|
|
if(responseCode != 200) {
|
| ... | ... | |