Package com.cumulocity.me.http

Examples of com.cumulocity.me.http.WebRequestBuilder


    public ResourceRepresentation get(String path, CumulocityMediaType mediaType, Class responseEntityType) {
        return authorizedRequest(path).accept(mediaType).get(HttpConnection.HTTP_OK, responseEntityType);
    }

    public ResourceRepresentation post(String path, CumulocityMediaType mediaType, ResourceRepresentation representation) {
        WebRequestBuilder builder = authorizedRequest(path).type(mediaType);
        if (platformParameters.isRequireResponseBody()) {
            builder.accept(mediaType);
        }
        return builder.post(representation, HttpConnection.HTTP_CREATED, representation.getClass());
    }
View Full Code Here


        }
        return builder.post(representation, HttpConnection.HTTP_CREATED, representation.getClass());
    }

    public ResourceRepresentation put(String path, CumulocityMediaType mediaType, ResourceRepresentation representation) {
        WebRequestBuilder builder = authorizedRequest(path).type(mediaType);
        if (platformParameters.isRequireResponseBody()) {
            builder.accept(mediaType);
        }
        return builder.put(representation, HttpConnection.HTTP_OK, representation.getClass());
    }
View Full Code Here

TOP

Related Classes of com.cumulocity.me.http.WebRequestBuilder

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.