Hi, I found the solution to my problem but figured it might be helpful to others.
.Net ( webapi /MVC) project
Webhooks keep getting suspended and request are sent 3 times.
By default, the POST action sent to the web api will respond with a 204 (no content) status code.
It is not mentionned at this time in the documentation (It should be) but Response must be 200 Ok status code.
Otherwise, the webhook is called a second and third time before being suspended.
By changing the default void method for a function which return a Ok Status code, you can change the default 204 status code message generated by .net webapi to a 200 response.
Public sub PostValue(<FromBody()> ByVal value As Object)
' My code
Public Function PostValue(<FromBody()> ByVal value As Object) As HttpResponseMessage
I lost a few hours figuring that out so I am putting it out there hoping to save some time to others.
(It would also be a good addition in the official documentation to mention the proper status code response and the 3 attempts behaviors.)
Publicação fechada para comentários.