added requiring call sites to set own content-type for anything other than json(aioweb doesn't set content-type properly)

This commit is contained in:
TPV committed 2026-07-19 09:28:22 -07:00
1 parent 638d8fb359
commit 17219507bf
1 file changed
+5 -4
+5 -4
View File
@@ -84,10 +84,11 @@ async def send_request(
url: Request URL.
method: HTTP method.
params: Query parameters.
json_data: JSON body. A dict here is sent as a JSON body.
data: Alternative body. Note aioweb routes any dict or list to a JSON
body, so true form-encoding requires a pre-encoded string; a form
dict passed here is sent as JSON.
json_data: JSON body. A dict here is sent as JSON with the
application/json content-type set by aioweb.
data: Raw request body, passed through unchanged (e.g. a url-encoded
form string). The caller owns the matching content-type via headers.
A dict is JSON-encoded by aioweb, so use json_data for JSON bodies.
headers: Per-request headers merged over the session defaults.
Returns: