RESTful HTTP client library with composable interceptor architecture for Node.js and browsers
76
{
"context": "This criteria evaluates how effectively the engineer uses rest.js's HTTP-specific promise methods (entity(), status(), headers(), header()) to extract response data. The focus is on whether they leverage these convenience methods instead of accessing the full response object.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses entity() method",
"description": "Uses the .entity() promise method to extract response body in getResponseBody() function instead of accessing response.entity directly",
"max_score": 25
},
{
"name": "Uses status() method",
"description": "Uses the .status() promise method to extract status code in getStatusCode() function instead of accessing response.status.code directly",
"max_score": 25
},
{
"name": "Uses headers() method",
"description": "Uses the .headers() promise method to extract all headers in getAllHeaders() function instead of accessing response.headers directly",
"max_score": 20
},
{
"name": "Uses header() method",
"description": "Uses the .header(name) promise method to extract a specific header value in getHeader() function instead of accessing response.headers[name] directly",
"max_score": 20
},
{
"name": "Applies header() correctly",
"description": "Uses the .header() method in checkContentType() function to retrieve the Content-Type header, demonstrating correct usage of header(name) with a specific header name",
"max_score": 10
}
]
}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