Forum Discussion

Tarun's avatar
Tarun
Maven
5 years ago
Solved

Facing issues Downloading a file with third party API

Hi All,

I am trying to use a third part file download API in the endpoints. This third-party API is returning an application/octet-stream; charset=UTF-8, however when I print the response in the endpoint using ${http._client_request.content},, the stream characters break down.

documentation:

https://developer.khoros.com/khoroscommunitydevdocs/reference/httpclientrequest#httpclientrequestprotocol-host-url

Is there a way I can control the ${http_client_request.content} characters not to break down in the output, as they start appearing as boxes rather than octet-stream characters or to directly share the object to the JS from here without using ${} if possible?

Regards

Tarun Kumar

 

2 Replies

  • DougS's avatar
    DougS
    Khoros Alumni (Retired)
    5 years ago

    Unfortunately http.client only supports JSON and plaintext responses and does not support streaming out file responses. It also does not support uploading files to remote endpoints.

  • Tarun's avatar
    Tarun
    Maven
    5 years ago

    Thank you for the confirmation DougS . ðŸ˜Š