Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
A request supplies a method, target URL, headers, and possibly a body. A response supplies a status, headers, and possibly a body, and must be completed.
A handler uses the method and URL to choose an operation, reads headers for metadata, and parses a body when appropriate. On the response side, choose a status and Content-Type consistent with the result and finish the response, for example with res.end in node:http. Do not send a second response after the first is completed. Leaving a request unresolved can keep the client waiting.