Subversion Repositories SmartDukaan

Rev

Rev 27422 | Rev 27426 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27422 Rev 27423
Line 117... Line 117...
117
 
117
 
118
		String authString = "Basic "
118
		String authString = "Basic "
119
				+ Base64.getEncoder().encodeToString(String.format("%s:%s", ACCOUNT_ID, SECRET_KEY).getBytes());
119
				+ Base64.getEncoder().encodeToString(String.format("%s:%s", ACCOUNT_ID, SECRET_KEY).getBytes());
120
 
120
 
121
		Request request1 = new Request.Builder()
121
		Request request1 = new Request.Builder()
122
				.url("https://v3.api.hypertrack.com/devices/" + hyperTrackKey.getHypertrackKeyId()).get()
122
				.url("https://v3.api.hypertrack.com/devices/"+hyperTrackKey.getHypertrackKeyId())
-
 
123
				.get()
123
				.addHeader("Authorization", authString).build();
124
				.addHeader("Authorization", authString).build();
124
 
125
 
125
		Response response = client.newCall(request1).execute();
126
		Response response = client.newCall(request1).execute();
126
		JSONObject jsonObj = new JSONObject(response.body().string());
127
		JSONObject jsonObj = new JSONObject(response.body().string());
127
		JSONObject c = jsonObj.getJSONObject("location");
128
		JSONObject c = jsonObj.getJSONObject("location");