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 2016/03/01 14:25:18 UTC

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

    [ https://issues.apache.org/jira/browse/OLTU-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15173743#comment-15173743 ] 

Julian Sedding commented on OLTU-174:
-------------------------------------

Thanks!

> 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)