Pentaho

 View Only

What is the data type returned for 'Result field name' of the "REST client" step? Can it be binary?

This thread has been viewed 2 times
  • 1.  What is the data type returned for 'Result field name' of the "REST client" step? Can it be binary?

    Posted 26 days ago

    Hello,

    I'm hoping someone can answer this question since I haven't found anything in the documentation.  I ask because it appears that PDI is stepping on the raw binary contained in the REST response - perhaps assuming a string value?  I'm just looking for some confirmation and whether there is a way to accept the response as binary and not a string.  The response header indicates that the Context-Type is "application\octet-stream".  

    Using Postman I'm able to save the response directly to a binary (*.jpg) file and it works fine.  Using PDI Rest client step the file is approximately 1k smaller in size, throws "unsupported file type" errors when trying to view, and it appears that most of the characters I see with Postman are instead converted to '?' (question marks) in the PDI output.

    The left shows characters changed to ?, right shows up as expected

    Is there a way to make sure that the Rest client 'Result field name' response output is preserved as binary?

    Thanks,

    --Ezra



    ------------------------------
    Ezra Wise
    Systems Engineer
    RightStar Inc.
    ------------------------------