CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-rest

RESTful HTTP client library with composable interceptor architecture for Node.js and browsers

76

1.28x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This evaluation assesses the engineer's proficiency in using the rest.js package to build a cross-platform HTTP client. The focus is on leveraging rest.js's built-in multi-platform support capabilities to create code that works seamlessly in both Node.js and browser environments.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses rest.js client",
      "description": "Solution imports and uses rest.js as the HTTP client library (e.g., require('rest') or import rest from 'rest')",
      "max_score": 15
    },
    {
      "name": "Platform-agnostic implementation",
      "description": "Implementation uses rest.js's default client which automatically selects the appropriate platform-specific implementation (Node.js http/https or browser XMLHttpRequest) without manual platform detection code",
      "max_score": 25
    },
    {
      "name": "Normalized responses",
      "description": "Code properly accesses response.status, response.headers, and response.entity from the normalized response object structure provided by rest.js",
      "max_score": 15
    },
    {
      "name": "Promise-based handling",
      "description": "Uses promise methods (.then, .catch) to handle asynchronous responses returned by rest.js client",
      "max_score": 10
    },
    {
      "name": "HTTP methods",
      "description": "Correctly configures request objects with method property (e.g., method: 'GET', method: 'POST') for different HTTP operations",
      "max_score": 10
    },
    {
      "name": "Request configuration",
      "description": "Properly structures request objects with path, method, entity, and headers properties as expected by rest.js",
      "max_score": 15
    },
    {
      "name": "Response promise methods",
      "description": "Utilizes rest.js's HTTP-specific promise methods such as .entity(), .status(), or .headers() to extract specific response data",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-rest

tile.json