Skip to content

Commit c166bf1

Browse files
committed
feat: Add custom User-Agent header to RestApiTool requests
1 parent 54ed079 commit c166bf1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ def _prepare_request_params(
253253
query_params: Dict[str, Any] = {}
254254
header_params: Dict[str, Any] = {}
255255
cookie_params: Dict[str, Any] = {}
256+
257+
# CUSTOM USER-AGENT
258+
header_params["User-Agent"] = "google-adk/1.0" # You can adjust the version
259+
256260

257261
params_map: Dict[str, ApiParameter] = {p.py_name: p for p in parameters}
258262

0 commit comments

Comments
 (0)