mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-17 00:21:19 +00:00
Merge branch 'patch-1' of https://github.com/karussell/swagger-codegen into karussell-patch-1
Conflicts: samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiException.java samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Configuration.java samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/Pair.java samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/StringUtil.java samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/ApiKeyAuth.java samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/auth/OAuth.java
This commit is contained in:
@@ -15,7 +15,6 @@ import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import com.squareup.okhttp.Call;
|
||||
import com.squareup.okhttp.Interceptor;
|
||||
import com.squareup.okhttp.Response;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -92,8 +91,8 @@ public class {{classname}} {
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||
@Override
|
||||
public Response intercept(Interceptor.Chain chain) throws IOException {
|
||||
Response originalResponse = chain.proceed(chain.request());
|
||||
public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user