bugfix
This commit is contained in:
parent
5221288224
commit
cb58e8998e
@ -74,13 +74,13 @@ bricks.FormBody = class extends bricks.VBox {
|
||||
var data = this.getValue();
|
||||
this.dispatch('submit', data);
|
||||
if (this.submit_url){
|
||||
var jcall = bricks.jcall;
|
||||
var rzt = await jcall(this.submit_url,
|
||||
var rc = new bricks.HttpResponse();
|
||||
var resp = await rc.httpcall(this.submit_url,
|
||||
{
|
||||
method:this.method || 'POST',
|
||||
params:data
|
||||
});
|
||||
this.dispatch('submited', rzt);
|
||||
this.dispatch('submited', resp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,6 +171,18 @@ bricks.HttpText = class {
|
||||
}
|
||||
}
|
||||
|
||||
bricks.HttpResponse = class extends bricks.HttpText {
|
||||
async get_result_data(resp){
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
|
||||
bricks.HttpRaw = class extends bricks.HttpText {
|
||||
async get_result_data(resp){
|
||||
return await resp.blob();
|
||||
}
|
||||
}
|
||||
|
||||
bricks.HttpJson = class extends bricks.HttpText {
|
||||
constructor(headers){
|
||||
if (!headers)
|
||||
|
Loading…
Reference in New Issue
Block a user