fixed after delete tests
This commit is contained in:
parent
f5abc63adf
commit
cd6f36f41d
@ -84,15 +84,21 @@ public class ApiGateway {
|
||||
if (this.logger.isDebugEnabled())
|
||||
this.logger.debug("Received response from " + method + ": " + response.getStatusLine().getStatusCode());
|
||||
|
||||
Response responseObject = null;
|
||||
if (response.getEntity() != null) {
|
||||
InputStream istream = response.getEntity().getContent();
|
||||
try {
|
||||
Response responseObject = this.omapper.readerFor(responseType).readValue(istream);
|
||||
responseObject.setHttpStatusCode(response.getStatusLine().getStatusCode());
|
||||
responseObject.setHttpStatusReason(response.getStatusLine().getReasonPhrase());
|
||||
return responseObject;
|
||||
responseObject = this.omapper.readerFor(responseType).readValue(istream);
|
||||
} finally {
|
||||
istream.close();
|
||||
}
|
||||
} else {
|
||||
responseObject = this.omapper.readerFor(responseType).readValue("{}");
|
||||
}
|
||||
|
||||
responseObject.setHttpStatusCode(response.getStatusLine().getStatusCode());
|
||||
responseObject.setHttpStatusReason(response.getStatusLine().getReasonPhrase());
|
||||
return responseObject;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,10 @@ public class DeleteReference {
|
||||
return "/repos/" + repoName + "/" + httpPath + "/" + ref;
|
||||
}
|
||||
|
||||
public static String httpPath = "git/refs";
|
||||
public static String constructRequestPathByBranch(String repoName, String branchName) {
|
||||
return constructRequestPath(repoName, "refs/heads/" + branchName);
|
||||
}
|
||||
|
||||
public static String httpPath = "git";
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user