I'm trying to post a form to a service that receives 2 pieces of data, but for some reason the function for form data isn't working.
This is the function I have so far:
var payload = msg.payload;
var data = { 'url': payload.content,'format': 'bestvideo' };
msg.headers = {
'content-type':'application/x-www-form-urlencoded',
'boundary':'63c5979328c44e2c869349443a94200e'
}
msg.payload = {JSONString : JSON.stringify(data)}
return msg;
And the msg.payload returns what I expect as data:
{"url":"https://www.youtube.com/watch?v=oY6_DSuYFg4","format":"bestvideo"}
But my service returns an error saying that URL was not received.
What am I missing?