diff --git a/src/monitor_utils/sessions.py b/src/monitor_utils/sessions.py index 7ef5eb2..a1b729d 100644 --- a/src/monitor_utils/sessions.py +++ b/src/monitor_utils/sessions.py @@ -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: