* Use try-with-resources
* Make bodyHasUnknownEncoding() static
* Fix nits in HttpLoggingInterceptorTest
* Revert "Use try-with-resources"
This reverts commit 57dcd61a9e.
* Add LoggingEventListener and use it in okcurl
* Fix tests failing in IP6 environment
* Make less assumptions about test environment
* Disable retry in test to make test sequence more predictable
* Fix javadoc compilation
There seems to be inconsistency between javdoc parsing between 'mvn verify' and Travis CI. Before the change, 'mvn clean verify' passes but Travis CI fails due to missing import of okhttp3.OkHttpClient. Just adding the missing import, causes 'mvn verify' to fail die to unused import. Changing the line wrapping seems to appease 'mvn verify'.
* Address comments
* Remove unused imports
Previously we were treating this header as if the response would never
change. This was incorrect. The correct behavior according to RFC 8246
is that the 'immutable' directive only applies to conditional requests
made during the freshness lifetime. We don't make conditional requests
during the freshness lifetime, so the entire directive doesn't apply
to us.
https://github.com/square/okhttp/issues/4313
* Add APIs to configure the client's default call timeout.
This isn't independently configured in an interceptor like the other
timeouts because it's already started by the time the interceptors run.
* Update okhttp/src/main/java/okhttp3/OkHttpClient.java
Co-Authored-By: swankjesse <jesse@swank.ca>
* Update okhttp/src/main/java/okhttp3/OkHttpClient.java
Co-Authored-By: swankjesse <jesse@swank.ca>
This turns out to be pretty difficult because of the way our
dispatcher works.
Calls can be rejected either immediately when the user calls
enqueue(), or later when a queued call is promoted.
It's also awkward because we don't want to hold locks when
calling the user's callFailed() method.
Strictly-speaking this change is backwards-incompatible because it adds
a new method to the Call interface. The method returns the call's timeout.
The trickiest part of this is signaling the end of the call, which
occurs after the last byte is consumed of the last follow up request,
or when the call fails. Fortunately this is made easier by borrowing
the sites used by EventListener, which already plots out where calls
end.
https://github.com/square/okhttp/issues/2840