Skip to content

Commit 962b62b

Browse files
committed
fix:use https instead of http
1 parent 98ca812 commit 962b62b

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

agb/api/http_client.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ def __init__(self, api_key: str = "", cfg=None):
9191

9292
def _process_endpoint(self, endpoint: str):
9393
"""Process endpoint logic"""
94-
# Use endpoint from config directly as base_url, ensure it includes http:// prefix
94+
# Use endpoint from config directly as base_url, ensure it includes https:// prefix
9595
if endpoint and not endpoint.startswith(("http://", "https://")):
96-
self.base_url = f"http://{endpoint}"
96+
self.base_url = f"https://{endpoint}"
9797
else:
9898
self.base_url = endpoint
9999

@@ -405,9 +405,6 @@ def _make_request(
405405
for key, value in self.session.headers.items():
406406
request_headers[str(key)] = str(value)
407407

408-
# Add Authorization header
409-
request_headers["authorization"] = self.api_key
410-
411408
if headers:
412409
request_headers.update(headers)
413410

agb/api/models/init_browser_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def from_http_response(cls, response_dict: Dict[str, Any]) -> "InitBrowserRespon
7373
status_code=response_dict.get("status_code", 0),
7474
url=response_dict.get("url", ""),
7575
headers=response_dict.get("headers", {}),
76-
json_data=response_dict.get("json"),
76+
json_data=response_dict.get("json") or {},
7777
text=response_dict.get("text"),
7878
success=response_dict.get("success", False),
7979
error=response_dict.get("error"),

0 commit comments

Comments
 (0)