Skip to content

Commit

Permalink
Update IniClient.java
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenzo-ingenito committed Oct 2, 2024
1 parent 554a8c8 commit fbd7f15
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.HttpMethod.PUT;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpEntity;
Expand Down Expand Up @@ -85,8 +88,13 @@ public IniReferenceResponseDTO reference(IniReferenceRequestDTO request) {
log.debug("{} - Executing request: {}", routes.identifier(), endpoint);

try {

Map<String,Object> requestBody = new HashMap<>();
requestBody.put("token", request.getToken());
requestBody.put("workflowInstanceId", "test");

// Execute request
ResponseEntity<IniReferenceResponseDTO> response = restTemplateIni.exchange(endpoint,POST,new HttpEntity<>(request.getToken()),IniReferenceResponseDTO.class);
ResponseEntity<IniReferenceResponseDTO> response = restTemplateIni.exchange(endpoint,POST,new HttpEntity<>(requestBody),IniReferenceResponseDTO.class);
// Retrieve body
output = response.getBody();
} catch (RestClientResponseException ex) {
Expand Down

0 comments on commit fbd7f15

Please sign in to comment.