daily pastebin goal
21%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Web proxy in python/django?
  2. import httplib2
  3. from django.conf.urls.defaults import *
  4. from django.http import HttpResponse
  5.  
  6. def proxy(request, url):
  7.     conn = httplib2.Http()
  8.     if request.method == "GET":
  9.         url = request.GET['url']
  10.         resp, content = conn.request(url, request.method)
  11.         return HttpResponse(content)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top