2016-11-10 4 views

답변

0

만족스런 Java SDK를 사용하고있는 것으로 보입니까?

해당 헤더가 SDK로 채워지므로 해당 헤더를 구문 분석해야하는 이유가 있습니까?

+0

@ 나는 Contentful 내은 webhook를 통합하려합니다. contentful은 헤더에 Content-type : application/vnd.contentful.management.v1 + json이라는 API를 트리거하고 내 Java 애플리케이션은 본문을 구문 분석 할 수 없습니다. application/json이 Content-type이 될 것으로 예상하므로 – Indrajeet

+0

@Indrajeet는 코드에서 application/header 대신 header를 기대할 수 없습니다. –

0

해결책을 찾았습니다.

본문의 유형이 json 인 경우 기본적으로 헤더의 Content-type application/json을 찾습니다.

Content-Type 헤더의 유효성을 검사하지 않으려면 JSON을 사용했고 작동했습니다.

는 BodyParser.Of (BodyParser.TolerantJson.class)