Skip to content

Commit bfce0b4

Browse files
committed
createTag() now properly uses form data vs. query params (#430).
1 parent 689f7df commit bfce0b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/gitlab4j/api/TagsApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public Tag createTag(Object projectIdOrPath, String tagName, String ref, String
236236
.withParam("ref", ref, true)
237237
.withParam("message", message)
238238
.withParam("release_description", releaseNotes);
239-
Response response = post(Response.Status.CREATED, formData.asMap(),
239+
Response response = post(Response.Status.CREATED, formData,
240240
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "tags");
241241
return (response.readEntity(Tag.class));
242242
}
@@ -299,7 +299,7 @@ public void deleteTag(Object projectIdOrPath, String tagName) throws GitLabApiEx
299299
*/
300300
public Release createRelease(Object projectIdOrPath, String tagName, String releaseNotes) throws GitLabApiException {
301301
Form formData = new GitLabApiForm().withParam("description", releaseNotes);
302-
Response response = post(Response.Status.CREATED, formData.asMap(),
302+
Response response = post(Response.Status.CREATED, formData,
303303
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "tags", urlEncode(tagName), "release");
304304
return (response.readEntity(Release.class));
305305
}
@@ -317,7 +317,7 @@ public Release createRelease(Object projectIdOrPath, String tagName, String rele
317317
*/
318318
public Release updateRelease(Object projectIdOrPath, String tagName, String releaseNotes) throws GitLabApiException {
319319
Form formData = new GitLabApiForm().withParam("description", releaseNotes);
320-
Response response = put(Response.Status.OK, formData.asMap(),
320+
Response response = putWithFormData(Response.Status.OK, formData,
321321
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "tags", urlEncode(tagName), "release");
322322
return (response.readEntity(Release.class));
323323
}

0 commit comments

Comments
 (0)