Spaces:
Running
Running
Download node_modules/@emailjs/browser/cjs/api/sendPost.js from Harry9233/Taste_Rider_Web: direct link, hf CLI and curl.
- Browser
- Download file 674 Bytes
-
https://huggingface.co/spaces/Harry9233/Taste_Rider_Web/resolve/main/node_modules/%40emailjs/browser/cjs/api/sendPost.js
- Command line
-
hf download hf://spaces/Harry9233/Taste_Rider_Web/node_modules/@emailjs/browser/cjs/api/sendPost.js
-
curl -L -o sendPost.js https://huggingface.co/spaces/Harry9233/Taste_Rider_Web/resolve/main/node_modules/%40emailjs/browser/cjs/api/sendPost.js
674 Bytes
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.sendPost = void 0; | |
| const EmailJSResponseStatus_1 = require("../models/EmailJSResponseStatus"); | |
| const store_1 = require("../store/store"); | |
| const sendPost = async (url, data, headers = {}) => { | |
| const response = await fetch(store_1.store.origin + url, { | |
| method: 'POST', | |
| headers, | |
| body: data, | |
| }); | |
| const message = await response.text(); | |
| const responseStatus = new EmailJSResponseStatus_1.EmailJSResponseStatus(response.status, message); | |
| if (response.ok) { | |
| return responseStatus; | |
| } | |
| throw responseStatus; | |
| }; | |
| exports.sendPost = sendPost; | |