Examples of ERXStringBufferRestResponse


Examples of er.rest.format.ERXStringBufferRestResponse

    return updateObjectWithPath(obj, filter, path(entityName, id, action, format), format);
  }

  public ERXRestRequestNode updateObjectWithPath(Object obj, ERXKeyFilter filter, String path, ERXRestFormat format) throws HttpException, IOException {
    ERXRestRequestNode node = ERXRestRequestNode.requestNodeWithObjectAndFilter(obj, filter, _context);
    ERXStringBufferRestResponse response = new ERXStringBufferRestResponse();
    format.writer().appendToResponse(node, response, format.delegate(), _context);

    HttpClient client = httpClient();
    PutMethod updateObjectMethod = new PutMethod(new ERXMutableURL(_baseURL).appendPath(path).toExternalForm());
    updateObjectMethod.setRequestEntity(new StringRequestEntity(response.toString()));
    client.executeMethod(updateObjectMethod);
    return requestNodeWithMethod(updateObjectMethod);
  }
View Full Code Here

Examples of er.rest.format.ERXStringBufferRestResponse

    return createObjectWithPath(obj, filter, path(entityName, id, action, format), format);
  }

  public ERXRestRequestNode createObjectWithPath(Object obj, ERXKeyFilter filter, String path, ERXRestFormat format) throws HttpException, IOException {
    ERXRestRequestNode node = ERXRestRequestNode.requestNodeWithObjectAndFilter(obj, filter, _context);
    ERXStringBufferRestResponse response = new ERXStringBufferRestResponse();
    format.writer().appendToResponse(node, response, format.delegate(), _context);

    HttpClient client = httpClient();
    PostMethod updateObjectMethod = new PostMethod(new ERXMutableURL(_baseURL).appendPath(path).toExternalForm());
    updateObjectMethod.setRequestEntity(new StringRequestEntity(response.toString()));
    client.executeMethod(updateObjectMethod);
    return requestNodeWithMethod(updateObjectMethod, format);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.