* @brief Prepare HTTPS request configuration * * @param config [in] Server configuration object containing: * - server [string] Target hostname * - port [number] Target port * - path [string] API endpoint path * - method [string] HTTP method * @param data [in] Request body payl
(config, data)
| 261 | * @note SSL verification intentionally disabled |
| 262 | */ |
| 263 | function prepare_request_options(config, data) { |
| 264 | return { |
| 265 | hostname: config.server, |
| 266 | port: config.port, |
| 267 | path: config.path, |
| 268 | method: config.method, |
| 269 | rejectUnauthorized: false, |
| 270 | headers: { |
| 271 | 'Content-Type': 'application/json', |
| 272 | 'Content-Length': Buffer.byteLength(data) |
| 273 | } |
| 274 | }; |
| 275 | } |
| 276 | |
| 277 | /** |
| 278 | * @brief Handle HTTP response data accumulation |