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