Package com.apitrary.api.request

Examples of com.apitrary.api.request.PostRequest


    if (entity == null) {
      throw new ApitraryOrmException("Cannot persist null entity");
    }
    log.debug("Saving " + entity.getClass());

    PostRequest request = new PostRequest();
    request.setEntity(resolveApitraryEntity(entity));

    String payload = marshall(entity);

    request.setRequestPayload(payload);

    PostResponse response = resolveApitraryClient().send(request);

    if (HttpStatus.Created.ordinal() == response.getStatusCode()) {
      return (T) new PostResponseUnmarshaller().unMarshall(response, entity);
View Full Code Here


    if (entity == null) {
      throw new ApitraryOrmException("Cannot persist null entity");
    }
    log.debug("Saving " + entity.getClass());

    PostRequest request = new PostRequest();
    request.setEntity(resolveApitraryEntity(entity));

    String payload = marshall(entity);

    request.setRequestPayload(payload);

    PostResponse response = resolveApitraryClient().send(request);

    if (HttpStatus.Created.ordinal() == response.getStatusCode()) {
      return (T) new PostResponseUnmarshaller().unMarshall(response, entity);
View Full Code Here

TOP

Related Classes of com.apitrary.api.request.PostRequest

Copyright © 2018 www.massapicom. 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.