tessl install tessl/npm-rest@2.0.0RESTful HTTP client library with composable interceptor architecture for Node.js and browsers
Agent Success
Agent success rate when using this tile
76%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.29x
Baseline
Agent success rate without this tile
59%
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.