S
S
shkiperoO2019-05-24 05:57:52
Laravel
shkiperoO, 2019-05-24 05:57:52

How to get webhook data that comes with jira?

I've just started getting into laravel and webhooks in particular. I want to write a script that will receive data about changes in jira through a webhook and send the information I need to the right Discord channel. The problem is that I can't figure out how to get this json that should come to my url.
Tried getting and viewing data like this

public function webhook () {
     $data = file_get_contents("php://input");
     $events = json_decode($data, true);
     dd($events);
}

but I get null all the time. Tell me how to see what comes through this webhook.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Wells, 2019-05-24
@Alex_Wells

laravel already has everything you need for your task. If the data does not come, then they are not there in principle, or you have the wrong http method. Read the documentation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question