Repository navigation
0.1.23
0.1.23 is here! What's new?
- We added a
jsonfunction exported fromprobun. Usage like this:
import { SendJSON, json, Failure } from "probun";
export async function POST(req: Request): Promise<Response> {
try {
const body = await json(req);
return SendJSON({
body
}, 200);
} catch (error) {
return Failure("Invalid JSON.")
}
}That's all for now. Enjoy!