Abubakkar
Abubakkar

Reputation: 15644

Reading Jira Webhook POST data

I am trying to read Jira issue data using a webhook that posts the data to my servlet.

When I travserve the request parameters map, I don't find anything in it.

But the content lenght shows as "8876" which means webhook is sending the data. Somehow I am not able to read/retrieve the data in my servlet.

Also checked, content-type returns as "application/json".

Does anyone know how to read Jira webhook post data?

Upvotes: 1

Views: 1892

Answers (1)

Svetlin Zarev
Svetlin Zarev

Reputation: 15673

You have to read the response body, not the parameters map. For that purpose you can use

 request.getInputStream();

or

request.getReader();

method.

PS: You can configure the web hook to post data to http://requestb.in/ so you can easily analyze the request parameters, the request body, the headers, etc.

Upvotes: 4

Related Questions