Browse Source

date moment

master
gsd 3 weeks ago
parent
commit
b40bd0f19e
  1. 4
      server.py

4
server.py

@ -6,6 +6,7 @@ import uvicorn
import os
from time import time
import asyncio
import datetime
class Collector:
app = FastAPI()
@ -76,7 +77,8 @@ class Collector:
"data":await request.body(),
"timestamp": time(),
"headers": {
"Content-Type": "text/plain; version=0.0.4; charset=utf-8; escaping=underscores"
"Content-Type": "text/plain; version=0.0.4; charset=utf-8; escaping=underscores",
"Date": datetime.datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S GMT")
}
}

Loading…
Cancel
Save