My content seems not parsable

Hello,

I try to send this kind of message in one of my incoming webhook:

curl -XPOST -d ‘payload={“username”:“Tuleap”,“text”:“User #101 pushed a new commit on : < https://tuleap_web_1.tuleap-aio-dev.docker/plugins/git/test/Test?p=Test.git&a=commitdiff&h=be2f1b2cec485e5ab0b2961f30b55fad086c413a|Test > refs/heads/master”}’ ‘URL_WEBHOOK’

My mattermost returns:
{“id”:“web.incoming_webhook.parse.app_error”,“message”:“Unable to parse incoming data”,“detailed_error”:“”,“status_code”:500,“is_oauth”:false}

However with more simple URL in my text, all is OK:
curl -XPOST -d ‘payload={“username”:“Tuleap”,“text”:“User #101 pushed a new commit on : < https://example.com|Test > refs/heads/master”}’ ‘URL_WEBHOOK’

What can I do in order to have my request with the complex URL working?

PS : I add space around the link to not hide the characters < and >

Thanks.

Hi @Humbert,

It seems to my that the problem is that you need to encode the URL.

If you try it this way it should work

curl -XPOST -d 'payload={"username":"Tuleap","text":"User #101 pushed a new commit on : < <https%3A%2F%2Ftuleap_web_1.tuleap-aio-dev.docker%2Fplugins%2Fgit%2Ftest%2FTest%3Fp%3DTest.git%26a%3Dcommitdiff%26h%3Dbe2f1b2cec485e5ab0b2961f30b55fad086c413a%7CTest> > refs/heads/master"}' 'http://localhost:8065/hooks/6ufmds8ijbyh9ej4sqbp5f9t4h'

Hope it helps