@@ -64,17 +64,47 @@ Optional data to include in the request body, for methods like `POST` or `PUT`.
6464If passing JSON data, ensure it is properly stringified and escaped.
6565For example, ` {"key":"value"} ` {lang=json} would need to be passed as ` {\"key\":\"value\"} ` {class="text-warning"}
6666:::
67+
68+ ::: field { name =" curl.headers.accept " type =string }
69+ Optional value for the ` Accept ` header to specify the expected response format.
70+ <br ><br >
71+ For example, ` application/json ` to indicate that you expect a JSON response.
72+ :::
73+
74+ ::: field { name =" curl.headers.authorization " type =string }
75+ Optional value for the ` Authorization ` header to include credentials or tokens for authentication.
76+ <br ><br >
77+ For example, ` Bearer your_token_here ` for bearer token authentication.
78+
79+ :::: warning
80+ If you have debug logging enabled, you can disable the logging sub-action in the ` wsgs.utils.curl ` action to prevent sensitive data from being logged.
81+ ::::
82+ :::
83+
84+ ::: field { name =" curl.headers.contentType " type =string }
85+ Optional value for the ` Content-Type ` header to specify the format of the request body.
86+ <br ><br >
87+ For example, ` application/json ` if you are sending JSON data in the request body.
88+ :::
89+
90+ ::: field { name =" curl.headers.userAgent " type =string }
91+ Optional value for the ` User-Agent ` header to specify the client making the request.
92+ <br ><br >
93+ For example, ` MyStreamerBotClient/1.0 ` to identify your Streamer.bot instance in the request.
94+ :::
6795::
6896
6997### Example
7098
7199For example, to make a ` POST ` request with a JSON body, you could set your arguments as follows:
72100
73- | Argument | Value |
74- | ------------- | ----------------------------------------------------------- |
75- | ` curl.method ` | ` POST ` |
76- | ` curl.url ` | ` https://webhook.site/f96fee22-c3f1-4aeb-84a0-3ee22ffc651c ` |
77- | ` curl.data ` | ` {\"id\": 1, \"name\": \"Test\"} ` |
101+ | Argument | Value |
102+ | -------------------------- | ----------------------------------------------------------- |
103+ | ` curl.method ` | ` POST ` |
104+ | ` curl.url ` | ` https://webhook.site/f96fee22-c3f1-4aeb-84a0-3ee22ffc651c ` |
105+ | ` curl.data ` | ` {\"id\": 1, \"name\": \"Test\"} ` |
106+ | ` curl.headers.accept ` | ` application/json ` |
107+ | ` curl.headers.contentType ` | ` application/json ` |
78108
79109Then simply run the ` wsgs.utils.curl ` action to send the request with the specified arguments:
80110
0 commit comments