I want to trigger some on-prem GitLab pipelines via “Outgoing Webhooks” or “Slash Command”. But it looks like GitLab does not accept some data that Mattermost send in outgoing request. I don’t know what exactly data is, but when I send a request via CURL to the same URL without data - all work fine. When Mattermost sends, I am got 404. I got the same result with “Outgoing Webhooks” nor “Slash Command.” Is it possible to send a request on Mattermost without including any data?
I appreciate your advice!
Hi @yokodzun and welcome to the Mattermost forums!
The outgoing webhooks always send data to the endpoint, you can see an example in the documentation:
It’s interesting though that you get a 404 here, which means not found - are you sure that the URL is correct or are you maybe getting a different error (401, f.ex. because the GitLab endpoint expects a GET request and not a POST request)?
Custom Slash Commands can be configured to use the GET request method and therefore do not send any data at all.
Yes, I used the same webhook-url in curl -X POST request, got a 200 OK code, and triggered pipeline.
OK, in this case I suggest to use a custom slash command which will allow you to specify the payload in the hopes that Gitlab will accept this then.