24-12-25
This commit is contained in:
@@ -91,6 +91,8 @@ public class ComplainServiceImpl implements ComplainService {
|
||||
String requestId = complainRequestDTO.getReqId();
|
||||
String fullUrl = complainDataUrl + BBPSConstant.ADD_COMPLAIN_ENDPOINT;
|
||||
|
||||
LOGGER.info("Full URL-: "+ fullUrl);
|
||||
|
||||
// Convert input DTO to JSON
|
||||
String requestJson = helper.convertObjectToJson(complainRequestDTO);
|
||||
|
||||
@@ -194,8 +196,14 @@ public class ComplainServiceImpl implements ComplainService {
|
||||
|
||||
try {
|
||||
|
||||
LOGGER.info("Calling external API: {}", fullUrl);
|
||||
Map<String, String> responseMap = httpService.postRequest(fullUrl, requestJson, headers);
|
||||
ObjectNode root = (ObjectNode) objectMapper.readTree(requestJson);
|
||||
root.put("tenantId", headersData.getTenantId());
|
||||
//root.put("agentId", headersData.getAgentId());
|
||||
|
||||
String finalJson = root.toString();
|
||||
LOGGER.info("Final Request Sent to API: {}", finalJson);
|
||||
// LOGGER.info("Calling external API: {}", fullUrl);
|
||||
Map<String, String> responseMap = httpService.postRequest(fullUrl, finalJson, headers);
|
||||
|
||||
String responseData = responseMap.get("data");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user