I have looked through many questions and do not see one which worked. I am working with UCWA API
responses where it is returning the following for incoming messages:
data:text/plain;charset=utf-8,hi+maya
The objective is to capture the input text "hi maya". I have tried doing a split
on the string
to capture everything after the comma and I have also tried decodeURIComponent(msg.msgIn)
. I have also looked at buffer for nodejs
.
Neither one is working, so would appreciate help on how to parse this.
Also, I have looked at similar posts here and it is related to downloading a file. I don't want to have to download a file - just directly take the string from the api response.
Thanks.