Skip to content

Commit 6cd87d1

Browse files
authored
provide populate_user_agent for client-side inspection (#31)
1 parent b7a5fd3 commit 6cd87d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

httpxthrottlecache/httpxclientmanager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ def _populate_user_agent(self, params: dict):
116116
params["headers"]["User-Agent"] = user_agent
117117
return params
118118

119+
def populate_user_agent(self, params: dict):
120+
"""Provided so clients can inspect the params that would be passed to HTTPX"""
121+
return self._populate_user_agent(params)
122+
119123
def get_batch(self, *, urls: Sequence[str] | Mapping[str, Path], _client_mocker=None):
120124
"""
121125
Fetch a batch of URLs concurrently and either return their content in-memory

0 commit comments

Comments
 (0)