MCPcopy Index your code
hub / github.com/SnailDev/github-hot-hub / request_session

Function request_session

github.py:25–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24@contextlib.contextmanager
25def request_session():
26 s = requests.session()
27 try:
28 s.headers.update(HEADERS)
29 s.mount("http://", HTTPAdapter(max_retries=RETRIES))
30 s.mount("https://", HTTPAdapter(max_retries=RETRIES))
31 yield s
32 finally:
33 s.close()
34
35
36class Since(Enum):

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected