def do_GET(self):
		dirs=self.path.split("/")
		if(len(dirs)>1):
			resource=dirs[1]
			if(resource == "addresses"):
				try:
					queryStr=parse_qs(urlparse(self.path).query)
					reader=str(queryStr["reader"][0])
					self.send_response(200)
					self.send_header('Content-type',"application/json")
					self.end_headers()
					self.wfile.write(json.dumps(self.server.getAddresses()))
				except IOError as e:
					self.send_response(404)
					self.server.log("Error with processing readers request for addresses: "+str(e))
			elif(resource == "states"):
				try:
					self.send_response(200)
					self.send_header('Content-type','application/json')
					self.end_headers()
					self.wfile.write(json.dumps(self.server.assetToPayload.values()))
				except __HOLE__ as e:
					self.send_response(404)
					self.server.log("Error with processing request for asset states: "+str(e))
			else:
				fileName="web/view.html"
				contentType="text/html"
				if("style.css" in dirs):
					fileName="web/style.css"
					contentType="text/css"
				elif("coords.cfg" in dirs):
					fileName="web/coords.cfg"
					contentType="application/json"
				elif("blueprint.png" in dirs):
					fileName="web/blueprint.png"
					contentType="image/png"
				elif("coord.html" in dirs):
					fileName="web/coord.html"
					contentType="text/html"
				elif("logo.png" in dirs):
					fileName="web/logo.png"
					contentType="image/png"
				f = open(fileName)
				self.send_response(200)
				self.send_header('Content-type',contentType)
				self.end_headers()
				self.wfile.write(f.read())
				f.close()
		else:
			self.send_response(404)
			self.server.log("Error with request. No resource specified")
dataset/ETHPy150Open SteveAbb/Vestigo/Vestigo Base/server.py/HTTPHandler.do_GET