Forum Discussion

jfpelletier's avatar
jfpelletier
Contributor
2 years ago
Solved

Writing output file from response from HTTP client

Hello all, I have a HTTP Client snap that returns a file as response (it's a legacy Word .doc file), and I can't seem to be able to save it correctly as binary file. The results returned by the cal...
  • Thom's avatar
    3 years ago

    Expanding on the solution provided and using information from the web related to javascript, I came up with the following statement. There was experimentation involved for sure.
    $.mapValues((value,key)=> typeof(value) == ‘object’ && value.hasOwnProperty(“@xsi:nil”)? null :value).mapKeys((value,key)=> key.replace(‘ns2:’,‘’))
    mapValues and mapKeys are admittedly a bit of a black box for me still.
    Thanks @JensDeveloper for leading me done a good path.