INNER CODE UNIT · Python
makeHttpCall
volkandindar/agartha · Agartha.py:157
def makeHttpCall(self, urlAdd, userID):
try:
userID = self.userNames.index(userID)
header = self.userNamesHttpReq[userID]
# changing new url path in the request header
header = header.replace(str(header.splitlines()[0]), header.splitlines()[0].split(" ", 2)[0] + " /" + urlAdd.split('/',3)[3] + " " + header.splitlines()[0].split(" ", 2)[2])
# header methods
if "GET" in header[:3] and self._cbAuthGETPOST.getSelectedIndex() == 1:
# request was GET and will be in POST
header = self._callbacks.getHelpers().toggleRequestMethod((header))
elif "POST" in header[:4] and self._cbAuthGETPOST.getSelectedIndex() == 0:
# request was POST alike and will be in GET
header = self._callbacks.getHelpers().toggleRequestMethod((header))
elif self._cbAuthGETPOST.getSelectedIndex() == 2:
# request is dynamic, proxy history will be reference
header = self.headerAdjustment(header, urlAdd, userID)