Code: Select all
def rPiHTTPproxy(httpVerb,protocol,host,path,data,headers):
if httpVerb == "GET":
req = urllib.request.Request(url)
try:
response = responseBytes.decode('utf-8')
return responseSo, the proxy is really simple, few lines that includes checking IP address of whether its for Pi 1or Pi2 and then decides to forward it or not?