mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 02:18:02 +00:00
Fix port-override for aes&klap transports (#734)
* Fix port-override for aes&klap transports * Add tests for port override
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"""Module for HttpClientSession class."""
|
||||
import asyncio
|
||||
import logging
|
||||
from typing import Any, Dict, Optional, Tuple, Union
|
||||
|
||||
import aiohttp
|
||||
@@ -13,6 +14,8 @@ from .exceptions import (
|
||||
)
|
||||
from .json import loads as json_loads
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_cookie_jar() -> aiohttp.CookieJar:
|
||||
"""Return a new cookie jar with the correct options for device communication."""
|
||||
@@ -54,6 +57,7 @@ class HttpClient:
|
||||
|
||||
If the request is provided via the json parameter json will be returned.
|
||||
"""
|
||||
_LOGGER.debug("Posting to %s", url)
|
||||
response_data = None
|
||||
self._last_url = url
|
||||
self.client.cookie_jar.clear()
|
||||
|
Reference in New Issue
Block a user