From 3c0aa8753001ba1f3ce52e764e54edade9c6e19c Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 6 Dec 2024 17:23:28 +0800 Subject: [PATCH] bugfix --- bricks/bricks.js | 1 + bricks/jsoncall.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bricks/bricks.js b/bricks/bricks.js index 798dc0d..5f2b6a6 100644 --- a/bricks/bricks.js +++ b/bricks/bricks.js @@ -328,6 +328,7 @@ bricks.buildUrlwidgetHandler = function(w, target, rtdata, desc){ params.append(key, value); } options.params = params; + options.method = "POST"; } else { rtdata = bricks.extend(rtdata, desc.event_params); options = bricks.apply_data(options, rtdata); diff --git a/bricks/jsoncall.js b/bricks/jsoncall.js index ac27bc3..f5f8155 100644 --- a/bricks/jsoncall.js +++ b/bricks/jsoncall.js @@ -187,11 +187,18 @@ bricks.HttpText = class { } } -bricks.HttpBin = class extends bricks.HttpText { +bricks.HttpArrayBuffer = class extends bricks.HttpText { async get_result_data(resp){ - return await resp.blob() + return await resp.arrayBuffer(); } } + +bricks.HttpBin = class extends bricks.HttpText { + async get_result_data(resp){ + return await resp.blob(); + } +} + bricks.HttpResponse = class extends bricks.HttpText { async get_result_data(resp){ return resp;