You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oltu.apache.org by "Julian Sedding (JIRA)" <ji...@apache.org> on 2015/06/01 10:36:17 UTC

[jira] [Created] (OLTU-174) OAuthResourceResponse does not support binary response bodies

Julian Sedding created OLTU-174:
-----------------------------------

             Summary: OAuthResourceResponse does not support binary response bodies
                 Key: OLTU-174
                 URL: https://issues.apache.org/jira/browse/OLTU-174
             Project: Apache Oltu
          Issue Type: Bug
          Components: oauth2-client
    Affects Versions: oauth2-1.0.0
            Reporter: Julian Sedding


I am working on a simple webapp that authorizes a user via OAuth to connect to a REST API on a remote server and then proxies any calls to the API to the remote server.

Amongst other things, the remote server delivers images, which fails currently. This is because {{OAuthResourceResponse}} only provides access to the body as {{String}}. Instead it should provide access to an {{InputStream}}.

{code:java}
final OAuthClient oAuthClient = new OAuthClient(new UrlConnectionClient());
final OAuthResourceResponse response =
            oAuthClient.resource(bearerClientRequest, "GET", OAuthResourceResponse.class);
response.getBody() // <-- returns String not InputStream
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)