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 import os
from time import time from time import time
import asyncio import asyncio
import datetime
class Collector: class Collector:
app = FastAPI() app = FastAPI()
@ -76,7 +77,8 @@ class Collector:
"data":await request.body(), "data":await request.body(),
"timestamp": time(), "timestamp": time(),
"headers": { "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