- define @get:JvmName(...) for the following vals in constructor instead of passing builder: Builder.
- url: HttpUrl
- method: String
- headers: Headers
- body: RequestBody?
- add @Deprecated(...) to the following functions.
- fun url(): HttpUrl
- fun method(): String
- fun headers(): Headers
- fun body(): RequestBody?
- fun cacheControl(): CacheControl
- clean up code where ()(Parentheses) is unnecessarily used.
We had a problem where boolean vals needed to be reverted back to
boolean funs. I'd like to go back to vals later, but supporting existing
source patterns is more important.
We also had a problem where single abstract method types (SAM types)
could be supplied as lambas when calling into Java but not when calling
into Kotlin.
I found these by pointing KotlinSourceCompatibilityTest at the OkHttp
Get there like this:
git co 7eb897ab2e223632b3316bf46a15d37307a3d3b6^
git co 7eb897ab2e okhttp/build.gradle
git co 7eb897ab2e build.gradle
* Add Module.md files for different artifacts with module and package info
This is what dokka uses to document packages and modules. Deleted the `package-info.kt` file as it doesn't do anything on its own, but can restore if it's still wanted
* Add Module.md for mockwebserver
* Only specify module if it exists
A bunch of samples don't have modules or readmes
* Remove package descriptors
These replace requestBodyEnd() / responseBodyEnd() in some failure scenarios.
They may also be issued in cases where no event was published previously.
* Build with 3 targets
* Update maven
* remove jdk 12 ea
* Try without errorprone temporarily
* Still set 1.8
* javadoc tolerance
* Profiles for 10 + 11
* More tolerant
* JDK 11 test skipping
* Cleanup imports
* Link to github issues
* Support JDK 12 building
* 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
* (in-progress) Support gzipped bodies as a networkInterceptor
* Fixed buffer cloning, added test for a still-unsupported encoding (Brotli)
* Avoid try-with-resources and too-long lines to appease build checks
* Fixed method name typo
* Added suggested comma between byte and gzipped-byte count
* Account for added comma in test
* Use buffer.writeAll to ensure all body content is read
* Indentation consistency
* Added test to confirm response body remains valid
This library is a provided dependency and is not necessary to be included
by OkHttp users.
This currently covers the okhttp and okhttp-logging-interceptor modules
only. It does not cover the 'internal' package in OkHttp, or its test cases.
We can add those as needed.
As-is it throws unchecked exceptions on unexpected charsets. This is a problem
because it can cause a misbehaving webserver to crash the client.
I don't expect this to break existing clients; returning 'null' has always
been a possibility; it's just returned in more cases.
BridgeInterceptor does some basic header management and implements gzip
on responses.
CacheInterceptor implements HTTP response caching.
ConnectInterceptor takes the StreamAllocation that's already allocated
and uses it to create an HttpStream.
I'm currently keeping these as longs. That's easy an unambiguous, but it also
feels rather primitive.
This was more work than I expected, but it doesn't seem particularly risky.
It's also potentially more efficient, since there's fewer places where we're
converting from string to long and vice versa.
Closes: https://github.com/square/okhttp/issues/2035
Avoid using System.out.
Use the best logging implementation on the host platform. On Java this is
java.util.logging. On Android it's Android.util.Log.
Closes https://github.com/square/okhttp/issues/2505