Add WithHttpInfo API methods to Java okhttp-gson client

to allow accessing response status code and headers
and removed the methods of recording last response info from
ApiClient.
This commit is contained in:
xhh
2015-12-05 20:34:50 +08:00
parent c5a48d9891
commit b1bc75189a
10 changed files with 378 additions and 114 deletions

View File

@@ -232,6 +232,7 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
if ("okhttp-gson".equals(getLibrary())) {
// the "okhttp-gson" library template requires "ApiCallback.mustache" for async call
supportingFiles.add(new SupportingFile("ApiCallback.mustache", invokerFolder, "ApiCallback.java"));
supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java"));
supportingFiles.add(new SupportingFile("ProgressRequestBody.mustache", invokerFolder, "ProgressRequestBody.java"));
supportingFiles.add(new SupportingFile("ProgressResponseBody.mustache", invokerFolder, "ProgressResponseBody.java"));
// "build.sbt" is for development with SBT