1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-26 06:43:09 +03:00
Commit Graph

57 Commits

Author SHA1 Message Date
jwilson
b031042e67 [maven-release-plugin] prepare release parent-3.3.0 2016-05-24 22:12:28 -04:00
Andy Dennie
f1dea26fd6 update Logging Interceptor to log connection failures 2016-05-14 13:21:09 -04:00
Jake Wharton
276ef646cd Merge pull request #2544 from square/jwilson.0508.no_synthetic_headers
Promote sent and received timestamps to fields on Response.
2016-05-09 00:03:38 -04:00
jwilson
bab8943f2b Promote sent and received timestamps to fields on Response.
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
2016-05-08 15:25:56 -04:00
jwilson
4f24a30c12 Make logging more consistent throughout OkHttp.
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
2016-05-07 21:08:37 -04:00
Alex Wegener
e0c2795bae Log plain text bodies only 2016-03-03 21:55:25 -05:00
jwilson
c293aecd28 [maven-release-plugin] prepare for next development iteration 2016-02-25 20:54:11 -05:00
jwilson
14eb077351 [maven-release-plugin] prepare release parent-3.2.0 2016-02-25 20:54:08 -05:00
jwilson
ac4aea6a52 [maven-release-plugin] prepare for next development iteration 2016-02-10 08:37:54 -05:00
jwilson
9aa5e87a2c [maven-release-plugin] prepare release parent-3.1.2 2016-02-10 08:37:52 -05:00
jwilson
ef1dbe1297 [maven-release-plugin] prepare for next development iteration 2016-02-07 22:10:22 -05:00
jwilson
0cd6b186b1 [maven-release-plugin] prepare release parent-3.1.1 2016-02-07 22:10:19 -05:00
jwilson
50395f9b6a [maven-release-plugin] prepare for next development iteration 2016-02-06 12:59:27 -05:00
jwilson
519ec8adca [maven-release-plugin] prepare release parent-3.1.0 2016-02-06 12:59:23 -05:00
Dave Roberge
fc238a225d Handle UnsupportedCharsetException in HttpLoggingInterceptor 2016-01-16 15:32:09 -05:00
gkimbwala
c3f8dcb22e Add Framed protocol to connections 2016-01-15 17:58:03 -08:00
jwilson
9b0706489c [maven-release-plugin] prepare for next development iteration 2016-01-14 16:03:12 -08:00
jwilson
bdbb3ad03c [maven-release-plugin] prepare release parent-3.0.1 2016-01-14 16:03:08 -08:00
jwilson
c4dc8725fb Revert "Make OkHttp OSGi ready"
This reverts commit 2b29196ee2.
2016-01-14 15:44:21 -08:00
jwilson
2dc79e01e1 [maven-release-plugin] prepare for next development iteration 2016-01-13 14:12:19 -08:00
jwilson
c9b812a4ab [maven-release-plugin] prepare release parent-3.0.0 2016-01-13 14:12:09 -08:00
Jeff Gilfelt
bf6c11f753 Use charset specified by the request body content type 2016-01-09 11:50:41 +00:00
Jung KyungHo
469c063135 Update okhttp-loggin-interceptor
I found missed version. It must to include the okhttp '3' on dependency of gradle.
2016-01-08 13:40:40 +09:00
Jung KyungHo
46d0edf4a4 Update okhttp-logging-interceptor README.md
Change how to use on okhttp-loging-interceptor's README.md
2016-01-08 10:54:42 +09:00
Jesse Wilson
3774437890 Merge pull request #2192 from lburgazzoli/okhttp-osgi
Make OkHttp OSGi ready
2016-01-06 00:32:38 -05:00
lburgazzoli
2b29196ee2 Make OkHttp OSGi ready 2016-01-05 09:22:11 +01:00
Jake Wharton
8ee07e13d3 Handle unknown content lengths. 2016-01-04 13:10:46 -05:00
jwilson
a2d9f7cfa9 Adjust documentation for OkHttp 3. 2016-01-02 09:34:47 -05:00
jwilson
6d1a0b4f96 [maven-release-plugin] prepare for next development iteration 2016-01-02 02:31:17 -05:00
jwilson
ffc35dbd02 [maven-release-plugin] prepare release parent-3.0.0-RC1 2016-01-02 02:31:14 -05:00
jwilson
f2461183e8 Refactor towards an OkHttpClient.Builder.
Still some work to do on method naming, but this was the interesting part.
Also very much need to rename OkUrlFactory in tests to urlFactory, otherwise
the client.client stuff becomes madness.
2016-01-01 10:55:32 -05:00
jwilson
e6dd58a886 Drop the global static shared connection pool.
Instead each new instance of OkHttpClient gets its own connection pool by
default. This makes the OkHttpClient instances a little more heavyweight
(in that two different instances yield two different connection pools, which
means two different cleanup threads) but it also means there's less weird
state sharing between instances.

One drawback of this is that if an application wants to immediately free
resources from an OkHttpClient it must call getConnectionPool().evictAll(),
otherwise the connection pool thread will remain alive for 5 minutes.
2015-12-29 17:49:25 -05:00
jwilson
98ae0fb92c Sort imports and wrap documentation at 100 columns.
This is a mechanical refactoring. The only thing I had trouble with is IntelliJ's
weak support for <ul> tags in Javadoc.
2015-12-23 19:34:28 -05:00
jwilson
02d6b4e78c Drop the get prefix on Connection accessors. 2015-12-21 21:10:48 -05:00
jwilson
ce3e7c40ff Change groupid to com.squareup.okhttp3. 2015-12-16 19:40:48 -05:00
jwilson
c9a89876de Rename com.squareup.okhttp to okhttp3
Maven group changes will come in follow up.
2015-12-16 01:34:59 -05:00
Jake Wharton
c642bea938 Remove Request#urlString(), just use url().toString(). 2015-12-15 00:33:09 -05:00
Adam Stroud
062bb14365 Add URL to HTTP response logging
Add the URL to the HTTP response when it is logged in the same manner
that the URL is added to the request logging. The added logging adds
some additional clarity when reading logs that contain many
request/response pairs.
2015-12-14 15:29:52 -05:00
Jake Wharton
93d547dcda Make HttpUrl the blessed URL method of Request. 2015-12-14 15:11:48 -05:00
jwilson
b809280b16 [maven-release-plugin] prepare for next development iteration 2015-12-13 20:35:30 -05:00
jwilson
a36b1fb73c [maven-release-plugin] prepare release parent-2.7.0 2015-12-13 20:35:26 -05:00
jwilson
479ea36f8b Fix some stream leaks.
There's a few places where OkHttp could leak a connection that needed to be
closed. With our new connection pool model this is easier to find. This fixes
two specific problems:
 - too many redirects doesn't release the last used connection
 - interceptors that throw runtime exceptions don't release the connection

There are likely more situations. I have hacked together a small little test
harness to make finding these leaks easier; that's not included in this PR.
2015-12-10 00:33:59 -05:00
jwilson
c071f6fef4 Don't log gzipped data. It isn't human readable. 2015-12-04 22:47:08 -05:00
Jesse Wilson
f8bb4f1420 Merge pull request #2038 from square/jw/getter
Log level getter.
2015-11-24 22:43:53 -05:00
Jake Wharton
ebb0003968 Log the full URL. 2015-11-24 22:20:41 -05:00
Jake Wharton
0fae6bbb50 Log level getter. 2015-11-24 22:14:12 -05:00
Jake Wharton
6fff68b1e9 Remove synthetic protocol header from native API.
Also formalize HttpURLConnection-only 'Response-Source' synthetic header to be on par with the protocol header (which is retained for this legacy interface).
2015-11-24 22:03:35 -05:00
Jake Wharton
8396d21dfa Force logging of headers from the request body. 2015-11-24 20:45:51 -05:00
Jake Wharton
b93104c9e6 Support 204 and 205 'No Content' replies when application interceptor. 2015-11-24 20:28:27 -05:00
Artem Zinnatullin
ee1dee1322 Add null check to HttpLoggingInterceptor.setLevel() 2015-11-23 05:35:43 +03:00