From 8f59e88fd6c3b52bb127d5ce7ea60d0768303c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=B9=BB?= Date: Wed, 20 May 2015 14:55:28 +0800 Subject: [PATCH] should use GET rather than PUT when get a tree of a projecct --- pom.xml | 2 +- src/main/java/com/messners/gitlab/api/RepositoryApi.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index b137c175..1aa3d368 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - com.messners + com.alibaba.platform.shared gitlab-api jar 2.0.2-SNAPSHOT diff --git a/src/main/java/com/messners/gitlab/api/RepositoryApi.java b/src/main/java/com/messners/gitlab/api/RepositoryApi.java index 66f593c4..ec130bfe 100644 --- a/src/main/java/com/messners/gitlab/api/RepositoryApi.java +++ b/src/main/java/com/messners/gitlab/api/RepositoryApi.java @@ -129,10 +129,10 @@ public class RepositoryApi extends AbstractApi { * * @param projectId * @return a tree with the directories and files of a project - * @throws GitLabApiException + * @throws GitLabApiException */ public List getTree (Integer projectId) throws GitLabApiException { - Response response = put(Response.Status.OK, null, "projects", projectId, "repository", "tree"); + Response response = get(Response.Status.OK, null, "projects", projectId, "repository", "tree"); return (response.readEntity(new GenericType>() {})); } -- GitLab