refactor(ahc): remove comments
This commit is contained in:
parent
58c5e67b81
commit
6dab35ba6d
|
@ -92,12 +92,6 @@ public class Main {
|
||||||
|
|
||||||
HttpClient client = new DefaultHttpClient(ccm, params);
|
HttpClient client = new DefaultHttpClient(ccm, params);
|
||||||
|
|
||||||
/**TODO
|
|
||||||
List nvps = new ArrayList();
|
|
||||||
nvps.add(new BasicNameValuePair("key1", "val1"));
|
|
||||||
nvps.add(new BasicNameValuePair("key2", "val3"));
|
|
||||||
*/
|
|
||||||
|
|
||||||
String address = URL + ":" + PORT + ROUTE;
|
String address = URL + ":" + PORT + ROUTE;
|
||||||
System.out.println("address: " + address);
|
System.out.println("address: " + address);
|
||||||
|
|
||||||
|
@ -141,14 +135,6 @@ public class Main {
|
||||||
entity = new ByteArrayEntity(payload.toString().getBytes(StandardCharsets.UTF_8));
|
entity = new ByteArrayEntity(payload.toString().getBytes(StandardCharsets.UTF_8));
|
||||||
post.setEntity(entity);
|
post.setEntity(entity);
|
||||||
|
|
||||||
/**TODO
|
|
||||||
try {
|
|
||||||
post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
//send request
|
//send request
|
||||||
HttpResponse response = null;
|
HttpResponse response = null;
|
||||||
try {
|
try {
|
||||||
|
@ -158,7 +144,6 @@ public class Main {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//read response status
|
//read response status
|
||||||
Scanner sc = null;
|
Scanner sc = null;
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
|
@ -201,8 +186,6 @@ public class Main {
|
||||||
statusPhrase = response.getStatusLine().getReasonPhrase();
|
statusPhrase = response.getStatusLine().getReasonPhrase();
|
||||||
System.out.println("statusPhrase: " + statusPhrase);
|
System.out.println("statusPhrase: " + statusPhrase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void post(final String uuid, final double latitude, final double longitude,
|
static void post(final String uuid, final double latitude, final double longitude,
|
||||||
|
|
Loading…
Reference in New Issue