Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MainHttpClient client = new MainHttpClient(newEndPointURL, mContext);
- try {
- client.setMethod(HttpMethod.POST);
- client.setStringEntity(createMessageResultJSON(results));
- client.setHeader("Accept", "application/json");
- client.setHeader("Content-type", "application/json");
- client.execute();
- } catch (Exception e) {
- mUtil.log(mContext.getString(R.string.message_processed_failed));
- } finally {
- if (client != null) {
- if (HttpStatus.SC_OK == client.responseCode()) {
- mUtil.log(mContext.getString(R.string.message_processed_success));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement