약간의 문제가 있습니다. 나는 POST를 보내려고 노력하고있어 설명서를 따르려고하지만, 제대로 할 수없는 것 같습니다. GitHub의에Python을 통해 게시 할 때 문제가 발생했습니다.
: https://github.com/trtmn/Python
풀 요청을 환영합니다! 이 문제를 해결하지만 난 당신의 URL의 끝에 슬래시를 추가하면 내가 코드를 실행할 때 응답을 수신 할 경우
# Getting documentation from :
#https://docs.python.org/2/howto/urllib2.html
import urllib
import urllib2
url = 'https://hooks.slack.com/services/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'
values = {"username": "webhookbot", "text": "This is posted to #general and comes from a bot named webhookbot.", "icon_emoji": ":ghost:"}
data = urllib.urlencode(values)
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
the_page = response.read()