diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/BaseResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/BaseResource.java index b9160914..8fb8d4c6 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/BaseResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/BaseResource.java @@ -21,6 +21,7 @@ import java.util.Set; * * @author jtremeaux */ +@Consumes(MediaType.APPLICATION_FORM_URLENCODED) public abstract class BaseResource { /** * @apiDefine admin Admin diff --git a/docs-web/src/test/java/com/sismics/docs/rest/resource/ThirdPartyWebhookResource.java b/docs-web/src/test/java/com/sismics/docs/rest/resource/ThirdPartyWebhookResource.java index b3082b00..512a6e64 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/resource/ThirdPartyWebhookResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/resource/ThirdPartyWebhookResource.java @@ -1,8 +1,10 @@ package com.sismics.docs.rest.resource; import javax.json.JsonObject; +import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; /** @@ -23,6 +25,7 @@ public class ThirdPartyWebhookResource extends BaseResource { * @return Response */ @POST + @Consumes(MediaType.APPLICATION_JSON) public Response webhook(JsonObject request) { lastPayload = request; return Response.ok().build();