jwilson
a4d3082d2f
Run IntelliJ's analysis on OkHttp.
...
This made a few hundred suggestions, many of which are thoughtful but
I'm deliberately ignoring anyway.
The following fixes are good ideas.
2016-06-27 00:47:50 -04:00
jwilson
c5187583bb
Add connection, cache, and platform subpackages.
2016-06-26 23:04:30 -04:00
jwilson
e3b3180f9c
Split HttpEngine into 3 interceptors.
...
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.
2016-06-26 10:27:34 -04:00
jwilson
8271dc0fb1
Fix HttpLoggingInterceptor to be cool with newlines.
...
Unfortunately our plaintext detector treats \r and \n as non-plaintext
characters, and they're completely fine.
Closes: https://github.com/square/okhttp/issues/2579
2016-05-28 10:49:31 -04:00
Andy Dennie
f1dea26fd6
update Logging Interceptor to log connection failures
2016-05-14 13:21:09 -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
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
Jeff Gilfelt
bf6c11f753
Use charset specified by the request body content type
2016-01-09 11:50:41 +00:00
Jake Wharton
8ee07e13d3
Handle unknown content lengths.
2016-01-04 13:10:46 -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
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
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
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
Artem Zinnatullin
c664d1864b
Return this from HttpLoggingInterceptor.setLevel()
2015-11-23 00:29:06 +03:00
Jake Wharton
75e69c3f49
Remove double-clone of Buffer.
2015-10-19 17:45:24 -04:00
Jake Wharton
8a7516cc66
Remove the need for an explicit Content-Length header to log response body.
...
This allows chunked responses with no specified length to be logged and have their size reported correctly.
2015-10-19 17:42:18 -04:00
Jake Wharton
43be47da69
Use clever buffer/clone trick for duplicate response body.
2015-10-09 11:12:08 -04:00
Jake Wharton
1f0cb4e6b6
Add logging interceptor for simple request and response logging.
2015-09-26 13:59:36 -04:00