URL encode target header in PATCH requests

This commit is contained in:
7shi
2024-12-01 05:15:47 +09:00
parent 0aca93fc62
commit ab7ee87e56

View File

@@ -1,4 +1,5 @@
import requests import requests
import urllib.parse
from typing import Any from typing import Any
class Obsidian(): class Obsidian():
@@ -106,7 +107,7 @@ class Obsidian():
'Content-Type': 'text/markdown', 'Content-Type': 'text/markdown',
'Operation': operation, 'Operation': operation,
'Target-Type': target_type, 'Target-Type': target_type,
'Target': target 'Target': urllib.parse.quote(target)
} }
def call_fn(): def call_fn():