0

Suppose you have 2 microservices. One client domain and another account. The MS client consumes some endpoints from the MS account. The MS account returned a status code 402. How do you currently do to traffic this status code on the MS client and return this information to the front?

I'm using RestTemplate to receive the information.

    public void execute(String id, Object object) {
    RestTemplate restTemplate = new RestTemplate();
    HttpEntity<Object> requestEntity = new HttpEntity<>(object);
    restTemplate.postForEntity(host + id + FEATURE_PATH, requestEntity, Void.class);
}

0 Answers0