sendForm.js 457 B

123456789101112
  1. export const sendForm = async (POST_URL, userData) => {
  2. const response = await fetch(POST_URL,
  3. {
  4. method: 'POST',
  5. body: JSON.stringify(userData),
  6. headers: {
  7. 'Content-Type': 'application/json'
  8. }
  9. });
  10. const json = await response.json();
  11. return json;
  12. }