com.undefinedlabs.scope.deps.okhttp3.internal.http.RealResponseBody Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scope-deps Show documentation
Show all versions of scope-deps Show documentation
Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly
identify, troubleshoot and fix failed builds.
This artifact contains dependencies for Scope.
package com.undefinedlabs.scope.deps.okhttp3.internal.http;
import com.undefinedlabs.scope.deps.okhttp3.Headers;
import com.undefinedlabs.scope.deps.okhttp3.MediaType;
import com.undefinedlabs.scope.deps.okhttp3.ResponseBody;
import com.undefinedlabs.scope.deps.okio.BufferedSource;
public final class RealResponseBody extends ResponseBody {
private final Headers headers;
private final BufferedSource source;
public RealResponseBody(Headers headers, BufferedSource source) {
this.headers = headers;
this.source = source;
}
@Override public MediaType contentType() {
String contentType = headers.get("Content-Type");
return contentType != null ? MediaType.parse(contentType) : null;
}
@Override public long contentLength() {
return HttpHeaders.contentLength(headers);
}
@Override public BufferedSource source() {
return source;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy