Need help with curl

i'd previously used the header, but not with also setting payload to:

$encodeUrl("url=https://www.youtube.com/watch?v=6jAb8Bzrs8U")

So with the above payload combined with the header..... it works!!

Thanks for your help guys, much appreciated.