Added image grabbing and data capacity to request and included runtime recognition
This commit is contained in:
@@ -11,7 +11,8 @@ def executeRequest(action, outputs, resolved):
|
||||
method=request["method"],
|
||||
url=request["path"],
|
||||
json=request.get("object"),
|
||||
headers=request.get("headers")
|
||||
headers=request.get("headers"),
|
||||
data=request.get("data")
|
||||
)
|
||||
|
||||
# if definition hasattr(cookies):
|
||||
|
||||
@@ -17,4 +17,7 @@ def buildRequest(definition, outputs, resolved):
|
||||
if hasattr(definition, "headers"):
|
||||
request["headers"] = buildHeaders(definition, request, outputs, resolved)
|
||||
|
||||
if hasattr(definition, "requestdata"):
|
||||
request["data"] = outputs[definition.requestdata]
|
||||
|
||||
return request, outputs
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
def buildImage(response, action, outputs):
|
||||
if hasattr(action, "image"):
|
||||
if response is not None:
|
||||
#try:
|
||||
imagebytes = response.content
|
||||
outputs[action.image] = imagebytes
|
||||
#except AttributeError:
|
||||
|
||||
else:
|
||||
print("No response received"),
|
||||
|
||||
return outputs
|
||||
@@ -1,4 +1,5 @@
|
||||
from core.runtime import buildSelect, buildOutput, buildSave, loadSave, buildLog
|
||||
from core.runtime.image import buildImage
|
||||
#from core.runtime.select import buildSelect3
|
||||
from core.runtime.resolver import resolveItem
|
||||
|
||||
@@ -6,12 +7,15 @@ def buildPreRuntimeAttr(action, outputs):
|
||||
outputs = loadSave(action, outputs)
|
||||
|
||||
resolved = resolveItem(action, outputs)
|
||||
|
||||
#print("RESOLVER DEBUG")
|
||||
#print(resolved)
|
||||
return outputs, resolved
|
||||
|
||||
def buildRuntimeAttr(action, outputs, response):
|
||||
outputs = buildOutput(response, action, outputs)
|
||||
|
||||
outputs = buildImage(response, action, outputs)
|
||||
|
||||
select_data, action, outputs = buildSelect(action, outputs)
|
||||
|
||||
buildSave(action, outputs)
|
||||
|
||||
Reference in New Issue
Block a user