update osem block
This commit is contained in:
@@ -18,6 +18,7 @@ Blockly.Arduino.sensebox_osem_connection = function (Block) {
|
||||
var box_id = this.getFieldValue('BoxID');
|
||||
var host = this.getFieldValue('host');
|
||||
var branch = Blockly.Arduino.statementToCode(Block, 'DO');
|
||||
var access_token = this.getFieldValue('access_token');
|
||||
var blocks = this.getDescendants();
|
||||
var type = this.getFieldValue('type');
|
||||
var ssl = this.getFieldValue('SSL');
|
||||
@@ -86,7 +87,7 @@ Blockly.Arduino.sensebox_osem_connection = function (Block) {
|
||||
if (connected == true) {
|
||||
// construct the HTTP POST request:
|
||||
sprintf_P(buffer,
|
||||
PSTR("POST /boxes/%s/data HTTP/1.1\\nHost: %s\\nContent-Type: "
|
||||
PSTR("POST /boxes/%s/data HTTP/1.1\\nAuthorization: ${access_token}\\nHost: %s\\nContent-Type: "
|
||||
"text/csv\\nConnection: close\\nContent-Length: %i\\n\\n"),
|
||||
SENSEBOX_ID, server, num_measurements * lengthMultiplikator);
|
||||
// send the HTTP POST request:
|
||||
@@ -146,7 +147,7 @@ Blockly.Arduino.sensebox_osem_connection = function (Block) {
|
||||
if (connected == true) {
|
||||
// construct the HTTP POST request:
|
||||
sprintf_P(buffer,
|
||||
PSTR("POST /boxes/%s/data HTTP/1.1\\nHost: %s\\nContent-Type: "
|
||||
PSTR("POST /boxes/%s/data HTTP/1.1\\nAuthorization: ${access_token}\\nHost: %s\\nContent-Type: "
|
||||
"text/csv\\nConnection: close\\nContent-Length: %i\\n\\n"),
|
||||
SENSEBOX_ID, server, num_measurements * lengthMultiplikator);
|
||||
// send the HTTP POST request:
|
||||
|
||||
Reference in New Issue
Block a user