MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _http_get

Function _http_get

skills/journal-fetcher/scripts/fetch_journal.py:248–260  ·  view source on GitHub ↗
(url: str, *, timeout: float, referer: Optional[str] = None)

Source from the content-addressed store, hash-verified

246
247 if Retry is not None and HTTP_RETRY_TOTAL > 0:
248 retry = Retry(
249 total=HTTP_RETRY_TOTAL,
250 connect=HTTP_RETRY_TOTAL,
251 read=HTTP_RETRY_TOTAL,
252 status=HTTP_RETRY_TOTAL,
253 backoff_factor=HTTP_RETRY_BACKOFF,
254 allowed_methods=frozenset({"GET", "HEAD"}),
255 status_forcelist=(408, 425, 429, 500, 502, 503, 504, 520, 521, 522, 524),
256 respect_retry_after_header=True,
257 raise_on_status=False,
258 )
259 adapter = HTTPAdapter(max_retries=retry)
260 session.mount("http://", adapter)
261 session.mount("https://", adapter)
262
263 return session

Callers 2

_fetch_article_detailFunction · 0.70

Calls 5

getMethod · 0.80
_create_http_sessionFunction · 0.70
_build_request_headersFunction · 0.70
raise_for_statusMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected