2016-06-15 4 views
1

콘텐츠를 게시하지 않았을 때 webhooks를 수신하기 위해 현재이 Contentful-webhook-server를 사용하고 있습니다. 콘텐츠 웹 후크 구문 분석 (사용자 정의 JSON 유형)

server.listen(30000, function(){ 
    console.log('Contentful webhook server running on port ' + 30000) 
}); 

server.on('ContentManagement.Entry.publish', function(req){ 
    console.log('An entry was published!', req); 
}); 

server.on('ContentManagement.Entry.unpublish', function(req){ 
    console.log('An entry was unpublished!'); 
    console.log('Deleted SOLR ID: ', req); 
}); 

는 내가있어 응답을 분석하기 위해 노력하고있어하지만 난 그들의 반응에서 사용하는 사용자 정의 JSON을 구문 분석 할 수있는 방법을 찾을 수 없습니다. Express를 사용하여 자체 서버를 생성해야합니까? 아니면이 예제 코드에서 응답 본문을 가져올 방법이 없습니다.

답변