Adds a new "slf4j" module. A few methods in Logger are now protected rather
than package protected to allow access by Logger subclasses that aren't
inner classes of Logger.
Request/Response/RequestTemplate are now fundamentally based on a byte[] body field.
For Request/RequestTemplate, if a charset is provided, it can be treated as text.
For many users of the library, the change should barely be noticeable, as the methods that
were changed were mostly used internally.
There were some non-backwards-compatible signature changes that require a
major version bump, however.
commit 34eb5751c760cf1f11cdbab920d6a3a1c6f06640
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 15 15:54:20 2013 -0400
Remove unnecessary defensive close of Reader
commit 38e51606750517d4a52571c408190e614a4a4834
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 13:59:35 2013 -0400
Replace wildcard import with individual imports
commit cc845814ea677ba5920caf5a7a914010623caf1e
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 13:55:37 2013 -0400
Revert GitHub example to use JacksonDecoder rather than JacksonModule now that JacksonDecoder behaves sensibly with its default ObjectMapper
commit 8b9638261afe2549c3a43238ee1b66d044f969f4
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 13:52:45 2013 -0400
Configure default ObjectMapper used by JacksonEncoder and JacksonDecoder with sensible overrides of default behaviors
commit 0f275bf7574b66c20a0e6aefe0140f599638992f
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 13:18:26 2013 -0400
Unwrap RuntimeJsonMappingExceptions caught in JacksonDecoder, since they are only ever used to wrap JsonMappingExceptions, which are IOExceptions.
commit 1b6995260a5727796e388bbb0b6c88b65e182415
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 13:09:44 2013 -0400
Update Jackson integration README
commit add4007a59559e7b4e2accfa0b0a0215bab62cef
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 13:07:35 2013 -0400
Update CHANGES and README to reflect addition of Jackson integration
commit 86c0fcfc704b1b8d03e5eaf69c608fc2761d617b
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 12:11:56 2013 -0400
Update Jackson GitHub example to make use of JacksonModule, and to avoid the need for Jackson annotations
commit 1552b3f8239636da0f27ace3c7b42038536e5caf
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 12:05:56 2013 -0400
Replace wildcard import with individual imports
commit 0b7cfd08516dfbf66f1a69263ed456f2c0671c76
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 11:01:11 2013 -0400
Initial implementation of Jackson codec
This new codec may be used as an alternative to Gson.
commit 94027ec3319f5145c0e18ef472d8e928e97a9527
Author: Matt Hurne <matt@thehurnes.com>
Date: Tue Oct 8 08:31:14 2013 -0400
Improve EncodeException and DecodeException Javadoc comments
This changeset adds a simple request interceptor that performs HTTP basic authentication.
The HTTP spec isn't very clear on the use of character encodings within this header.
The most common interpretation in servers appears to be to expect ISO-8859-1, so I've
used that as a default, as well as allowing the encoding to be specified.
At @adriancole's suggestion, sun.misc.BASE64Encoder is used for the base64 encoding
rather than pulling an implementation into the Util class. If we ever run into a JRE that
doesn't provide compatibility with that class, we can eliminate that dependency.
The logic in GsonCodec was split into GsonEncoder and GsonDecoder, each of which can
now be used separately. GsonCodec was deprecated, and can be removed in the next major
version. To facilitate use outside of Dagger, the double-to-int map type adapter was broken into
its own class, and is included by default when using the default constructors of either the
encoder or decoder. The examples have been updated to use the new encoder/decoder instead
of the codec.
Previously, the default decoder had logic relating to responses that made it distinct from StringDecoder.
Now that that's handled elsewhere, the body of the decode methods had less meaningful differences.
I opted to maintain Decoder.Default for consistency with other default implementations. StringDecoder
is maintained as a separate class for backwards compatibility, and because it may be useful in the
future for clients to use a plain String decoder even if the default decoder starts having additional
capabilities.