Commit 8f59e88f authored by 六幻's avatar 六幻
Browse files

should use GET rather than PUT when get a tree of a projecct

parent 2473bc22
......@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.messners</groupId>
<groupId>com.alibaba.platform.shared</groupId>
<artifactId>gitlab-api</artifactId>
<packaging>jar</packaging>
<version>2.0.2-SNAPSHOT</version>
......
......@@ -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<TreeItem> 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<List<TreeItem>>() {}));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment