a guest Aug 10th, 2018 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Web proxy in python/django?
- import httplib2
- from django.conf.urls.defaults import *
- from django.http import HttpResponse
- def proxy(request, url):
- conn = httplib2.Http()
- if request.method == "GET":
- url = request.GET['url']
- resp, content = conn.request(url, request.method)
- return HttpResponse(content)
RAW Paste Data