I have a string that represents some binary data, looking like:
\x89PNG\x1a\x00\x00\x00IHDR\x00\x00 etc
I need to post this string to some API, etc. AS IS but the problem is that Javascript automatically converts it to
PNG etc
.escape, .encodeURI.. etc don't help
In Python such conversion can be done like string.encode('UTF-8') but I can't find nothing like that in JS.
Maybe someone knows the library or something that may help?