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());
}