A socket operation was attempted to an unreachable network in python httplib
I am trying to make a REST client from django using httplib . But it is refusing the connection I tried the following import hashlib import hmac from django.shortcuts import render_to_response from django.template import RequestContext def loginAction(request): username=request.POST['email'] password=request.POST['password'] import httplib, urllib params = urllib.urlencode({'username': username}) #hash username here to authenticate digest=hmac.new("qnscAdgRlkIhAUPY44oiexBKtQbGY0orf7OV1I50", str(request.POST['password']),hashlib.sha1).hexdigest() auth=username+":"+digest headers = {"Content