public boolean put(Object object, int objectId) {
   String endpoint = getAnnotatedEndpoint(object);
   String requestUri = configuration.getApiBaseUri() + endpoint + "/" + objectId;
   HttpRequestWithBody request = UnirestUtil.put(requestUri, object, headers());
   Put put = new Put(UnirestUtil.getObjectResponse(request));
   apiErrorCollection = put.getApiErrorCollection();
   return put.isValid(request.getHttpMethod());
 }
Beispiel #2
0
  public static HttpResponse<JsonNode> executeSilently(final HttpRequestWithBody request) {
    HttpResponse<JsonNode> response = null;

    try {
      response = request.asJson();
    } catch (UnirestException e) {
      e.printStackTrace();
    }

    return response;
  }
 @Override
 public void applyFields(HttpRequestWithBody request) {
   request.field("authenticationTicket", authenticationTicket);
 }