Created
June 1, 2019 15:28
-
-
Save brianray/6846429304e87ed0f5ef5fd9f81efcac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_x_y() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var x = sheet.getRange(2,1); | |
var y = sheet.getRange(2,2); | |
data = {"x": x.getValue(), "y": y.getValue()}; | |
var URL = "https://us-central1-mw-automl-first-look.cloudfunctions.net/tutorial" //< Add your URL | |
var options = { | |
'method' : 'post', | |
'contentType': 'application/json', | |
// Convert the JavaScript object to a JSON string. | |
'payload' : JSON.stringify(data) | |
}; | |
return UrlFetchApp.fetch(URL, options).getContentText(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment