Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/gg_api_core/src/gg_api_core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ async def _request(self, method: str, endpoint: str, **kwargs) -> Any:

while retry_count <= max_retries:
try:
async with httpx.AsyncClient() as client:
async with httpx.AsyncClient(follow_redirects=True) as client:
logger.debug(f"Sending {method} request to {url}")
response = await client.request(method, url, headers=headers, **kwargs)

Expand Down Expand Up @@ -652,7 +652,7 @@ async def _request_list(self, endpoint: str, **kwargs) -> ListResponse:
}
headers.update(kwargs.pop("headers", {}))

async with httpx.AsyncClient() as client:
async with httpx.AsyncClient(follow_redirects=True) as client:
response = await client.get(url, headers=headers, **kwargs)
response.raise_for_status()

Expand Down
4 changes: 2 additions & 2 deletions packages/gg_api_core/src/gg_api_core/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ async def redirect_handler(authorization_url: str) -> None:
"User-Agent": f"MCP-Server/{self.token_name}", # Include in user agent
}

async with httpx.AsyncClient() as client:
async with httpx.AsyncClient(follow_redirects=True) as client:
response = await client.post(token_url, data=token_params, headers=headers)

if response.status_code == 200:
Expand Down Expand Up @@ -763,7 +763,7 @@ async def _fetch_token_info(self) -> APITokenInfo | None:
try:
import httpx # Import here to avoid circular imports

async with httpx.AsyncClient() as client:
async with httpx.AsyncClient(follow_redirects=True) as client:
# Use the correct API endpoint with the full path
response = await client.get(
f"{self.api_url}/api_tokens/self",
Expand Down
Loading