Created
December 10, 2021 09:28
-
-
Save aishwarydhare/3f8b31c5e97eef31fb5476537a43ea19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from http.server import BaseHTTPRequestHandler, HTTPServer | |
class SampleHTTPServerHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(200) | |
self.send_header('Content-type', 'text/html') | |
self.end_headers() | |
print(self.headers) | |
received_guid = self.headers['Access-Control-Expose-Headers'] | |
self.wfile.write(bytes(f"r: {received_guid}", "utf8")) | |
with HTTPServer(('0.0.0.0', 8095), SampleHTTPServerHandler) as server: | |
server.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment