MCPcopy
hub / github.com/pex-tool/pex / do_GET

Method do_GET

tests/test_fetcher.py:29–35  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27def server_address():
28 class GETRequestHandler(BaseHTTPRequestHandler):
29 def do_GET(self):
30 body = self.headers["User-Agent"].encode("utf-8")
31 self.send_response(200)
32 self.send_header("Content-Type", "application/octet-stream")
33 self.send_header("Content-Length", str(len(body)))
34 self.end_headers()
35 self.wfile.write(body)
36
37 server = TCPServer(("127.0.0.1", 0), GETRequestHandler)
38 host, port = server.server_address

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected