From c3d3a173bb70d82bf2a822c9f952d824a794813a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Thu, 28 Nov 2024 13:52:47 +0100 Subject: [PATCH] Don't use query param for the POST requests (#1199) --- src/main/java/org/gitlab4j/api/EpicsApi.java | 6 ++---- src/main/java/org/gitlab4j/api/RunnersApi.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/gitlab4j/api/EpicsApi.java b/src/main/java/org/gitlab4j/api/EpicsApi.java index 009e36487..b2a292fcb 100644 --- a/src/main/java/org/gitlab4j/api/EpicsApi.java +++ b/src/main/java/org/gitlab4j/api/EpicsApi.java @@ -332,8 +332,7 @@ public Epic createEpic( .withParam("start_date", startDate) .withParam("end_date", endDate) .withParam("created_at", createdAt); - Response response = - post(Response.Status.CREATED, formData.asMap(), "groups", getGroupIdOrPath(groupIdOrPath), "epics"); + Response response = post(Response.Status.CREATED, formData, "groups", getGroupIdOrPath(groupIdOrPath), "epics"); return (response.readEntity(Epic.class)); } @@ -363,8 +362,7 @@ public Epic createEpic(Object groupIdOrPath, Epic epic) throws GitLabApiExceptio .withParam("start_date", epic.getStartDate()) .withParam("end_date", epic.getEndDate()) .withParam("created_at", epic.getCreatedAt()); - Response response = - post(Response.Status.CREATED, formData.asMap(), "groups", getGroupIdOrPath(groupIdOrPath), "epics"); + Response response = post(Response.Status.CREATED, formData, "groups", getGroupIdOrPath(groupIdOrPath), "epics"); return (response.readEntity(Epic.class)); } diff --git a/src/main/java/org/gitlab4j/api/RunnersApi.java b/src/main/java/org/gitlab4j/api/RunnersApi.java index c8d80b9b0..fb42a0add 100644 --- a/src/main/java/org/gitlab4j/api/RunnersApi.java +++ b/src/main/java/org/gitlab4j/api/RunnersApi.java @@ -530,7 +530,7 @@ public RunnerDetail registerRunner( .withParam("run_untagged", runUntagged, false) .withParam("tag_list", tagList, false) .withParam("maximum_timeout", maximumTimeout, false); - Response response = post(Response.Status.CREATED, formData.asMap(), "runners"); + Response response = post(Response.Status.CREATED, formData, "runners"); return (response.readEntity(RunnerDetail.class)); }