The DayPilot.Http.post() method makes an HTTP request to the specified URL using POST method.
The syntax and behavior is inspired by axios.
DayPilot.Http.post(url[, data[, options]]);
The DayPilot.Http.post() method returns a promise. If the HTTP response status code is 200, 201, 204 or 304 the promise is resolved, otherwise it is rejected.
The success handler receives an args object as an argument:
The error handler receives an args object as an argument:
const data = { name: "John" }; const {data: result} = await DayPilot.Http.post("/createUser", data); console.log("result", result);