diff --git a/src/main/java/org/hisp/dhis/actions/RestApiActions.java b/src/main/java/org/hisp/dhis/actions/RestApiActions.java index 4639632..6d34d42 100644 --- a/src/main/java/org/hisp/dhis/actions/RestApiActions.java +++ b/src/main/java/org/hisp/dhis/actions/RestApiActions.java @@ -205,6 +205,18 @@ public ApiResponse update( String resourceId, Object object ) return new ApiResponse( response ); } + public ApiResponse update( String resourceId, Object object, String contentType ) + { + Response response = + this.given() + .contentType( contentType ) + .body( object, ObjectMapperType.GSON ) + .when() + .put( resourceId ); + + return new ApiResponse( response ); + } + public ApiResponse postFile( File file ) { return this.postFile( file, null );