django-rest-framework-proxy
django-rest-framework-proxy copied to clipboard
Unable to proxy binary responses like images
We are trying to proxy a third-party image service and we need the proxy library to respond with the raw binary payload it received from the service. Even after setting the 'return_raw' flag, the payload is converted to text before further responding.
It works when I change response.text to response.content on the marked line.
https://github.com/eofs/django-rest-framework-proxy/blob/1fa51b14df364e3dfca3afe57179efefc184d64f/rest_framework_proxy/views.py#L135
It looks like the PR already exists: https://github.com/eofs/django-rest-framework-proxy/pull/30/files
@vinkobuble Yea I created this PR and have been waiting for approval.