How do I create a doPost(e) function in Apps Script project to capture HTTP POST data from web service?

前端 未结 3 769
挽巷
挽巷 2020-12-07 02:53

I\'m trying to create a script to capture data via HTTP POST from Ejunkie. When someone makes a purchase on ejunkie, they can transmit all the order data via HTTP POST to a

3条回答
  •  独厮守ぢ
    2020-12-07 03:00

    Could try something like this? Also you might look @ this thread: doPost(e) does not return parameters but doGet(e) does?

    function doPost(e) {
      
      if(typeof e !== 'undefined')
        return ContentService.createTextOutput(JSON.stringify(e.parameter));
      
    }

提交回复
热议问题