如何在python / django中发出发布请求? [英] how to make post requests in python/django?
本文介绍了如何在python / django中发出发布请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如 http://developers.facebook.com/docs/api#publishing 我要发出发布请求以更新用户状态。如何在python / django中发出发布请求?
as described in http://developers.facebook.com/docs/api#publishing i want to make a post request to update a users status .How do i make post requests in python / django?
推荐答案
import urllib2
urllib2.urlopen('http://example.com', 'a=1&b=2')
会将发帖请求发送到 http ://example.com ,参数为a = 1和b = 2
will send a post request to http://example.com, with parameters a=1 and b=2
这篇关于如何在python / django中发出发布请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文