fix: two-user model bug fixes and docs
This commit is contained in:
+2
-2
@@ -5,6 +5,7 @@ Communicates with vacuum-walld over a Unix socket using requests-unixsocket.
|
||||
|
||||
import json
|
||||
import logging
|
||||
import urllib.parse
|
||||
from typing import Any
|
||||
|
||||
import requests
|
||||
@@ -64,12 +65,11 @@ def request(
|
||||
Raises NotFound on HTTP 404. Raises BadRequest on HTTP 400.
|
||||
"""
|
||||
sp = socket_path or _get_socket_path()
|
||||
url = f"http://localhost{path}"
|
||||
url = f"http+unix://{urllib.parse.quote(sp, safe='')}{path}"
|
||||
sess = requests_unixsocket.Session()
|
||||
try:
|
||||
kwargs: dict[str, Any] = {
|
||||
"timeout": timeout,
|
||||
"unix_socket": sp,
|
||||
}
|
||||
if method == "GET":
|
||||
if query_params:
|
||||
|
||||
Reference in New Issue
Block a user