[ 
https://issues.apache.org/jira/browse/OLTU-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stein Welberg reassigned OLTU-174:
----------------------------------

    Assignee: Stein Welberg

> 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
>            Assignee: Stein Welberg
>         Attachments: OLTU-174.patch
>
>
> 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)

Reply via email to