git-slack-hook icon indicating copy to clipboard operation
git-slack-hook copied to clipboard

Curl wasn't working for me

Open yanniboi opened this issue 9 years ago • 2 comments

I cloned your script (excellent script by the way... super helpful!) but it didnt work for me out of the box.

My bash scripting isnt that great, but I did a load of debugging and I came to the conclusion that everything is working up until the curl command.

I replaced:

curl -s
-d "payload=$payload"
"$webhook_url"
>/dev/null

with

curl -X POST
--data-urlencode "payload=$payload"
$webhook_url
>/dev/null

and now it works fine.

Just in case anyone else has a similar problem.

yanniboi avatar Sep 24 '15 20:09 yanniboi

Tried these changes and now I get HTTP/1.1 503 Service Unavailable on the payload. Any ideas?

rchannel avatar Apr 01 '16 22:04 rchannel

Thanks @yanniboi, I had similar problems, and your fix solved it for me.

nebbian avatar Sep 21 '17 07:09 nebbian