Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
104547d
Reverted Changes
ravishanigarapu Dec 24, 2024
85ca627
removed Unused imports
ravishanigarapu Dec 24, 2024
efe5412
Merge branch 'PSMRI:develop' into develop
ravishanigarapu Jan 9, 2025
f30feda
Merge branch 'PSMRI:develop' into develop
ravishanigarapu Feb 24, 2025
25d6cbe
Merge branch 'PSMRI:develop' into develop
ravishanigarapu Feb 28, 2025
1e675d9
Merge branch 'PSMRI:develop' into develop
ravishanigarapu Apr 7, 2025
6f93e13
Update application.properties
ravishanigarapu Apr 7, 2025
9ea499d
Merge branch 'PSMRI:develop' into develop
ravishanigarapu Apr 17, 2025
fe1908c
Swagger changes
ravishanigarapu Apr 17, 2025
3602722
Merge branch 'PSMRI:develop' into develop
ravishanigarapu May 14, 2025
e37d6ba
Null Condition Added
ravishanigarapu May 14, 2025
2e2d733
Merge branch 'PSMRI:develop' into develop
ravishanigarapu May 20, 2025
35237c1
AMM-1456
ravishanigarapu May 20, 2025
36dbe68
Indent format
ravishanigarapu May 20, 2025
3498d85
User-Agent validation
ravishanigarapu May 22, 2025
681977d
wrapper class added
ravishanigarapu May 22, 2025
f29182e
RestTemplateUtil class created for Headers
ravishanigarapu May 22, 2025
44a9c0e
code rabbit issues fixed
ravishanigarapu May 22, 2025
4d24d28
if condition added
ravishanigarapu May 22, 2025
97659e7
null check
ravishanigarapu May 22, 2025
0987627
Merge branch 'develop' into develop
ravishanigarapu May 22, 2025
72e5839
loggers Added
ravishanigarapu May 23, 2025
b6c2e1d
Merge branch 'PSMRI:develop' into develop
ravishanigarapu May 23, 2025
3375310
Merge branch 'develop' of https://github.com/ravishanigarapu/TM-API i…
ravishanigarapu May 23, 2025
8f00997
null check
ravishanigarapu May 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ public String registerBeneficiary(String comingRequest, String Authorization) th

RestTemplate restTemplate = new RestTemplate();
HttpEntity<Object> request = RestTemplateUtil.createRequestEntity(comingRequest, Authorization);
logger.info("Before Calling Common-API registration : "+request.getHeaders());
ResponseEntity<String> response = restTemplate.exchange(registrationUrl, HttpMethod.POST, request,
String.class);
if (response.getStatusCodeValue() == 200 & response.hasBody()) {
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/iemr/tm/utils/RestTemplateUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static HttpEntity<Object> createRequestEntity(Object body, String authori

ServletRequestAttributes servletRequestAttributes = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes());
if (servletRequestAttributes == null) {
logger.info("Null servletRequestAttributes");
MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE + ";charset=utf-8");
headers.add(HttpHeaders.AUTHORIZATION, authorization);
Expand All @@ -39,7 +40,9 @@ public static HttpEntity<Object> createRequestEntity(Object body, String authori
headers.add(HttpHeaders.USER_AGENT, UserAgentContext.getUserAgent());
}
headers.add(HttpHeaders.AUTHORIZATION, authorization);
headers.add("JwtToken",requestHeader.getHeader("JwtToken"));
if(null != requestHeader.getHeader("JwtToken")) {
headers.add("JwtToken",requestHeader.getHeader("JwtToken"));
}
if(null != jwtTokenFromCookie) {
headers.add(HttpHeaders.COOKIE, "Jwttoken=" + jwtTokenFromCookie);
}
Expand Down
Loading