Here is my get method of my Resource
class:
from flask_restful import Resource
import subprocess
CMD = ['some', 'cmd' ]
class MyResource(Resource):
def get(self):
try:
completed_process = subprocess.run(CMD, check=True,
capture_output=True)
....
At which point in the above code can I retrieve (and print) the IP of the incoming XGET
request?
I am aware of this answer but it does not indicate how to go about it with flask_restful
and the Resource
class.