Python Post方法在本地主机上不可用?
我正在努力实现: 当我按Jupyter笔记本中的方式运行时,我得到:Python Post方法在本地主机上不可用?,python,jupyter-notebook,localhost,httpresponse,Python,Jupyter Notebook,Localhost,Httpresponse,我正在努力实现: 当我按Jupyter笔记本中的方式运行时,我得到: <Response [403]> 但这次我得到了: <Response [405]> 所以不允许使用post方法?为什么,以及如何更改?是的,本地主机中允许使用post方法。尝试启动本地服务器,然后使用post方法。我认为您的防火墙正在阻止端口,请关闭防火墙,然后尝试相同的方法。。。。 requests.post('http://localhost:8888/tree?token=xxx', d
<Response [403]>
但这次我得到了:
<Response [405]>
所以不允许使用
post
方法?为什么,以及如何更改?是的,本地主机中允许使用post方法。尝试启动本地服务器,然后使用post方法。我认为您的防火墙正在阻止端口,请关闭防火墙,然后尝试相同的方法。。。。
requests.post('http://localhost:8888/tree?token=xxx', data={u'post': u'Andr\xe9 T\xe9chin\xe9'})
<Response [405]>