HTTP/HTTPS client port module for the UT framework, built on top of the 'request' library. Current stable version is 8.9.9. It provides a configurable HTTP client for making web service requests with features like TLS support, response parsing (JSON/XML), timeouts, custom headers, and message transformation via send/receive hooks. Part of the UT ecosystem, it integrates tightly with UT's bus architecture. Compared to using 'request' or 'axios' directly, it offers a structured configuration format and automatic error handling tailored for microservice communication. Release cadence is irregular, tied to UT framework updates.
npm install ut-port-httpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows a basic HTTP port configuration using ut-port-http, with common options like URL, method, and transforming the response.
Consider migrating to a port that uses 'node-fetch' or 'axios' if possible, or pin to a supported version of 'request'.
Always return msg from receive, even on error: if(msg.$$.mtid === 'error') return msg;
Include 'type': 'http' in the module.exports object.
Update receive functions to read msg.payload and msg.httpStatus instead of msg.body.
Ensure compatible parsers are installed (e.g., xml2js) or set parseResponse to false and handle parsing manually.
Run: npm install request
Ensure the port is used within a UT application context (e.g., ut-run).
Check for msg.$$ existence: if(msg.$$ && msg.$$.mtid === 'error') return msg;
No dependency data recorded yet.