RESTful HTTP client library with composable interceptor architecture for Node.js and browsers
76
A lightweight HTTP client wrapper that provides a consistent interface for making API requests in both Node.js and browser environments.
The client must:
@generates
/**
* Creates a configured HTTP client that works across platforms
* @param {object} [config] - Optional configuration for the client
* @returns {function} Configured client function
*/
function createClient(config);
/**
* Makes an HTTP request
* @param {string|object} request - URL or request object with path, method, entity, headers
* @returns {Promise} Promise resolving to response with status, headers, and entity
*/
function request(urlOrConfig);
module.exports = { createClient, request };Provides cross-platform HTTP client functionality with automatic platform detection.
Install with Tessl CLI
npx tessl i tessl/npm-restevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10