I will write a python script that listen to a webhook for a custom tool that will send json(They might support other format also) on a port I can specify.
How to write something similar to linux command: "nc -l 9000" to dump the out put I get on that port (header and body)?
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
print() <- how to get the data here?
return {"message": "ok"}
I want to print the content in the terminal, then I can easy see what I will get and take action on it. Not sure what I should replay to them if that is even needed (need to check this, they are not done with their part yet).