Skip to content

Commit

Permalink
feat: add new PUT action that accepts content type (#8)
Browse files Browse the repository at this point in the history
* feat: add new PUT action that accepts content type

* fix: revert version
  • Loading branch information
vilkg authored Mar 23, 2020
1 parent 1a50aab commit e92ce7e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/org/hisp/dhis/actions/RestApiActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit e92ce7e

Please sign in to comment.