CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/lib/api/is-post.ts
Views: 687
1
export default function isPost(req, res): boolean {
2
if (req?.method !== "POST") {
3
res?.status(404).json({ message: "must use a POST request" });
4
return false;
5
}
6
return true;
7
}
8
9