mirror of
https://github.com/MelisaDev/melisa.git
synced 2024-09-22 19:22:01 +03:00
feat(http): fix X-Audit-Log-Reason
This commit is contained in:
parent
702f7d3129
commit
801195e892
1 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,7 @@ from __future__ import annotations
|
|||
|
||||
import asyncio
|
||||
import logging
|
||||
from urllib.parse import quote
|
||||
from typing import Dict, Optional, Any
|
||||
|
||||
from aiohttp import ClientSession, ClientResponse
|
||||
|
@ -85,6 +86,11 @@ class HTTPClient:
|
|||
|
||||
url = f"{self.url}/{endpoint}"
|
||||
|
||||
if headers is not None and headers.get("X-Audit-Log-Reason") is not None:
|
||||
headers["X-Audit-Log-Reason"] = quote(
|
||||
headers["X-Audit-Log-Reason"], safe="/ "
|
||||
)
|
||||
|
||||
async with self.__aiohttp_session.request(
|
||||
method,
|
||||
url,
|
||||
|
|
Loading…
Reference in a new issue