Email integration with PEC and MAILGUN services using api call.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package net.gepafin.tendermanagement.service.feignClient;
|
||||
|
||||
import feign.Headers;
|
||||
import net.gepafin.tendermanagement.model.request.PecEmailRequest;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
@FeignClient(name = "pecClient", url = "${api.pecUrl}")
|
||||
public interface PecFeignClient {
|
||||
@PostMapping("/send")
|
||||
ResponseEntity<Void> sendEmail(@RequestHeader("Authorization") String token,
|
||||
@RequestBody PecEmailRequest emailRequest);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user