mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 23:13:10 +00:00
[CST-10632] added ITs against SendLDNMessageAction
This commit is contained in:
@@ -47,13 +47,17 @@ public class SendLDNMessageAction implements LDNAction {
|
||||
|
||||
log.info("Announcing notification {}", request);
|
||||
|
||||
// https://notify-inbox.info/inbox/ for test
|
||||
ResponseEntity<String> response;
|
||||
|
||||
ResponseEntity<String> response = restTemplate.postForEntity(
|
||||
notification.getTarget().getInbox(),
|
||||
request,
|
||||
String.class
|
||||
);
|
||||
try {
|
||||
response = restTemplate.postForEntity(
|
||||
notification.getTarget().getInbox(),
|
||||
request,
|
||||
String.class);
|
||||
} catch (Exception e) {
|
||||
log.error(e);
|
||||
return ActionStatus.ABORT;
|
||||
}
|
||||
|
||||
if (response.getStatusCode() == HttpStatus.ACCEPTED ||
|
||||
response.getStatusCode() == HttpStatus.CREATED) {
|
||||
|
Reference in New Issue
Block a user