PushService does not execute (Web App Push)

0

I'm creating a push notification push using this library WebApp Push

When I run the code below inside a "main" method, the notification is sent correctly.

try {
        PushService pushService = new PushService(PUBLIC_KEY, PRIVATE_KEY, SUBJECT);
        Notification notification = new Notification(subscription, payload);
        HttpResponse httpResponse = pushService.send(notification);
        log.info(String.valueOf(httpResponse.getStatusLine().getStatusCode()));
    } catch (GeneralSecurityException | IOException | JoseException | ExecutionException | InterruptedException e ) {
        e.printStackTrace();
    }

However, I have developed a service rest to receive the notification parameters, and whenever it arrives at the PushService pushService = new PushService(PUBLIC_KEY, PRIVATE_KEY, SUBJECT); line, nothing below is executed. Simply for that line and there is no exception in the log.

When I run by Postman, the return is:

<html> <head> <title>Error</title> </head> <body>Internal Server Error</body> </html>

    
asked by anonymous 29.08.2018 / 14:56

0 answers