You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constgot=require('got');(async()=>{const{ body }=awaitgot.post('google app script url',{json: {hello: 'world'},responseType: 'json'})console.log(body.data)})()
After this code is executed, GAS will throw back the 405 error directly.
Does it seem to be caused by the got default of sending "OPTIONS" first?
How can I stop "got" from sending OPTIONS before POST?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The following code is a simplified version.
After this code is executed, GAS will throw back the 405 error directly.
Does it seem to be caused by the got default of sending "OPTIONS" first?
How can I stop "got" from sending OPTIONS before POST?
Beta Was this translation helpful? Give feedback.
All reactions