MCPcopy
hub / github.com/dougmoscrop/serverless-http / from

Method from

lib/response.js:30–39  ·  view source on GitHub ↗
(res)

Source from the content-addressed store, hash-verified

28module.exports = class ServerlessResponse extends http.ServerResponse {
29
30 static from(res) {
31 const response = new ServerlessResponse(res);
32
33 response.statusCode = res.statusCode
34 response[HEADERS] = res.headers;
35 response[BODY] = [Buffer.from(res.body)];
36 response.end();
37
38 return response;
39 }
40
41 static body(res) {
42 return Buffer.concat(res[BODY]);

Callers 8

addDataFunction · 0.80
get-framework.jsFile · 0.80
requestBodyFunction · 0.80
requestBodyFunction · 0.80
spec.jsFile · 0.80
format-response.jsFile · 0.80
koa.jsFile · 0.80
compare.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected