oauth1-signer-java
oauth1-signer-java copied to clipboard
[REQ] Accept a payload of type byte[] in OAuth.getAuthorizationHeader()
The current OAuth.getAuthorizationHeader() method has a payload parameter of type String. In cases where the payload is not available as a String, conversion to a String might be impossible (binary data) or inefficient in memory usage. Providing a overloaded version of OAuth.getAuthorizationHeader() that accepts a byte[] payload would be helpful in these cases.
The existing code also makes an assumption that the character set for all string values passed to OAuth.getAuthorizationHeader() is the same. This may not be a safe assumption in all cases. Allowing payload to be passed a bytes provides a partial workaround.
I would be happy to provide the trivial PR to address this issue if desired.
@rowland66, feel free to submit a PR with your recommended changes and we could take a look. Thanks.
Closing due to long period of inactivity.