Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const postURL = `https://sheets.googleapis.com/v4/spreadsheets/1GOSI8dDYmuBIznSV-Ge9WtY_RSivo6rEpnpC8EZDnuw/values/orders!:append?insertDataOption=INSERT_ROWS&valueInputOption=RAW&key=mykey`;
- let opts = {
- method: 'POST',
- body: JSON.stringify({
- // "range": 'orders',
- "majorDimension": 'ROWS',
- "values": [
- this.state.email
- ],
- })
- }
- e.preventDefault()
- fetch(postURL, opts)
- .then(response => console.log('Success!', response))
- .catch(error => console.error('Error!', error.message))
- }
Add Comment
Please, Sign In to add comment