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-2/

{
  "context": "This evaluation assesses how effectively the engineer uses rest.js's interceptor architecture to implement request and response logging. The focus is on proper usage of the client.wrap() API, interceptor lifecycle phases (request and response), and the interceptor return value patterns.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses client.wrap()",
      "description": "The implementation uses the client.wrap() method to apply an interceptor to the HTTP client, rather than attempting to manually wrap or modify requests",
      "max_score": 20
    },
    {
      "name": "Implements request phase",
      "description": "The interceptor defines a 'request' phase function that captures request metadata (method, path, timestamp) before the request is sent",
      "max_score": 20
    },
    {
      "name": "Implements response phase",
      "description": "The interceptor defines a 'response' phase function that captures response metadata (status code, duration) after the response is received",
      "max_score": 20
    },
    {
      "name": "Returns request in request phase",
      "description": "The request phase function properly returns the request object (or a promise resolving to it) to maintain the interceptor chain",
      "max_score": 15
    },
    {
      "name": "Returns response in response phase",
      "description": "The response phase function properly returns the response object (or a promise resolving to it) to maintain the interceptor chain",
      "max_score": 15
    },
    {
      "name": "Configurable via init",
      "description": "The interceptor uses the 'init' phase or configuration object to allow customization of log output destination (array vs console)",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-rest

tile.json