Пример #1
0
  public PaymentNotification[] getNotifications(String userId) {
    WebTarget notificationTarget = appTarget.path("notification/user/" + userId);
    Invocation.Builder setupBuilder = notificationTarget.request(MediaType.APPLICATION_JSON);
    Response response = setupBuilder.get();

    Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss.SSS").create();
    String json = response.readEntity(String.class);
    return gson.fromJson(json, PaymentNotification[].class);
  }
Пример #2
0
 public Response backdoorTeardown() {
   WebTarget backdoorTarget = appTarget.path("backdoor");
   WebTarget setupTarget = backdoorTarget.path("teardown");
   Invocation.Builder setupBuilder = setupTarget.request(MediaType.TEXT_PLAIN_TYPE);
   return setupBuilder.get();
 }