123456789101112131415161718 |
- import rpyc
- import time
- from fastapi import FastAPI
- import sys
- import os
- app = FastAPI()
- @app.get("/domain/{domain_name}")
- async def read_item(domain_name):
- conn = rpyc.connect("localhost",12345)
- jsdata=conn.root.get_url('http://headers.jsontest.com/')
- return jsdata
- # print(jsdata)
- # return {"item_id": domain_name}
|