Github 저장소에 이미 Webhook을 만들었습니다. 페이로드 URL을 다음으로 설정했습니다. localhost : 4567/payloadDjango의 서버를 구현하여 Webhook의 POST 요청을 수신하는 방법은 무엇입니까? NGROK을 사용하여 로컬 호스트를 인터넷에 노출합니다.
로컬 호스트를 사용하고 있기 때문에 인터넷에 노출해야합니다. 이를 위해 ngrok을 사용하고 있는데 다음 명령을 실행했습니다. ./ngrok http 4567
커밋에 대한 작업이있을 때마다 알림을 받기 위해이 링크에 쓰여진 모든 단계를 수행하고 있습니다. 저장소에서 완료되었습니다.
링크 => 나는은 webhook에서 POST 요청을 수신하기 위해 장고 프레임 워크를 사용하고 https://developer.github.com/webhooks/configuring/
. 그러나 위의 링크에서 제공되는 자습서에서는 Sinatra (Ruby에서 웹 응용 프로그램을 만드는 데 사용)를 사용했습니다. Ruby에 익숙하지 않습니다. 장고에서 작업을 계속하고 싶습니다. 장고의 서버를 사용하여 Webhook의 POST 요청을들을 수있는 방법을 알려주십시오.
내가 한 일은 웹 훅에서 다음과 같은 오류가 발생했습니다. '응답'아래에 주어진다 :
<!doctype html5>
<html>
<head>
<style type="text/css">
strong { font-weight: bold; }
hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; }
html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } body { margin: 0; }
a { background-color: transparent; }
a:active, a:hover { outline: 0; }
</style>
<style type="text/css">
body { background-color: #f5f5f5; }
.container { width: 500px; margin: auto; color: #444; padding: 5px; }
a, strong { color: purple; text-decoration: none; }
a:hover { text-decoration: underline; }
h2 { text-align: center; color: #000; }
p { line-height: 20px; }
</style>
</head>
<body>
<div class="container">
<h2>Failed to complete tunnel connection</h2>
<hr />
<p>
The connection to <strong><a
href="http://ac448203.ngrok.io">http://ac448203.ngrok.io</a></strong>
was successfully tunneled to your ngrok client,
but the client failed to establish a connection to
the local address <strong><a href="http://localhost:80">localhost:80</a>
</strong>.
</p>
<p>
Make sure that a web service is running on
<strong><a href="http://localhost:80">localhost:80</a></strong> and that it
is a valid address.
</p>
<p>
The error encountered was: <strong style="color: #9E2929">dial tcp [::1]:80:
connectex: No connection could be made because the target machine actively
refused it.</strong>
</p>}
</div>
</body>
</html>
당신이 보여줄 수 실행 우리가 귀하의 스크린 샷을 편리하게 잘라 버린 요청 및 응답. 어떤 비밀을 흐리게 할 수 있습니다 –
@CliveMakamara 실제로이 플랫폼에서 사진을 게시하는 방법을 모르겠다. 그 죄송합니다. 나는 응답 부분을 게시 할 것이다. 고맙습니다. –
걱정하지 않아도 한 달 동안 만 회원으로 활동했습니다. 난 단지 당신을 도울 더 많은 정보가 필요합니다 –