From 09eb9c3257314d845611b7eee38e4ac8ca152907 Mon Sep 17 00:00:00 2001
From: AlexHerting <117334335+AlexHerting@users.noreply.github.com>
Date: Tue, 16 Apr 2024 15:34:24 -0500
Subject: [PATCH] changed to delete

---
 src/main/java/org/gitlab4j/api/RepositoryApi.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/gitlab4j/api/RepositoryApi.java b/src/main/java/org/gitlab4j/api/RepositoryApi.java
index c42c06700..7863dacb4 100644
--- a/src/main/java/org/gitlab4j/api/RepositoryApi.java
+++ b/src/main/java/org/gitlab4j/api/RepositoryApi.java
@@ -237,7 +237,7 @@ public Branch protectBranch(Object projectIdOrPath, String branchName) throws Gi
      * Unprotects a single project repository branch. This is an idempotent function, unprotecting an
      * already unprotected repository branch will not produce an error.
      *
-     * <pre><code>GitLab Endpoint: PUT /projects/:id/repository/branches/:branch/unprotect</code></pre>
+     * <pre><code>GitLab Endpoint: DELETE /projects/:id/repository/branches/:branch/unprotect</code></pre>
      *
      * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
      * @param branchName the name of the branch to un-protect
@@ -245,7 +245,7 @@ public Branch protectBranch(Object projectIdOrPath, String branchName) throws Gi
      * @throws GitLabApiException if any exception occurs
      */
     public Branch unprotectBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
-        Response response = put(Response.Status.OK, null, "projects",
+        Response response = delete(Response.Status.OK, null, "projects",
                 getProjectIdOrPath(projectIdOrPath), "repository", "branches", urlEncode(branchName), "unprotect");
         return (response.readEntity(Branch.class));
     }