@aledsage wrote: > I also cleaned up some other deprecated code that seemed like quick wins. The > replacement for new StringPayload(value) is quite long winded (particularly > when you want to specify the charset)! > > Payloads.newByteSourcePayload(ByteSource.wrap(value.getBytes(Charset.forName("UTF-8"))));
The deprecated payload types generally have only minor notational advantages for tests; usually callers have larger inputs in either in `ByteSource` or `InputStream` forms. That being said, we could provide helper overrides to Payloads which take `byte[]` and `String` and automatically return `ByteSource` or provide some helper classes which extend `ByteSource`. However, I have observed many users suboptimally using the deprecated APIs, for example reading entire inputs instead of streaming inputs, so providing a narrower interface might nudge them to the more optimal uses. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/69#issuecomment-49499408