| Line 158... |
Line 158... |
| 158 |
try {
|
158 |
try {
|
| 159 |
HttpResponse response = httpClient.execute(request);
|
159 |
HttpResponse response = httpClient.execute(request);
|
| 160 |
String responseString = this.toString(response.getEntity().getContent());
|
160 |
String responseString = this.toString(response.getEntity().getContent());
|
| 161 |
LOGGER.info("Got response from server with responseCode {}", response.getStatusLine().getStatusCode());
|
161 |
LOGGER.info("Got response from server with responseCode {}", response.getStatusLine().getStatusCode());
|
| 162 |
LOGGER.info("Response String {}", responseString);
|
162 |
LOGGER.info("Response String {}", responseString);
|
| 163 |
if (response.getStatusLine().getStatusCode() == HttpStatus.OK.value()) {
|
163 |
if (response.getStatusLine().getStatusCode() == HttpStatus.OK.value() || response.getStatusLine().getStatusCode() == HttpStatus.CREATED.value() || response.getStatusLine().getStatusCode() == HttpStatus.ACCEPTED.value()) {
|
| 164 |
return responseString;
|
164 |
return responseString;
|
| 165 |
} else {
|
165 |
} else {
|
| 166 |
LOGGER.info("Response String {} ", responseString);
|
166 |
LOGGER.info("Response String {} ", responseString);
|
| 167 |
throw new ProfitMandiBusinessException("", "", "GE_1005");
|
167 |
throw new ProfitMandiBusinessException("", "", "GE_1005");
|
| 168 |
}
|
168 |
}
|