bugfix
This commit is contained in:
parent
5221288224
commit
cb58e8998e
@ -74,13 +74,13 @@ bricks.FormBody = class extends bricks.VBox {
|
|||||||
var data = this.getValue();
|
var data = this.getValue();
|
||||||
this.dispatch('submit', data);
|
this.dispatch('submit', data);
|
||||||
if (this.submit_url){
|
if (this.submit_url){
|
||||||
var jcall = bricks.jcall;
|
var rc = new bricks.HttpResponse();
|
||||||
var rzt = await jcall(this.submit_url,
|
var resp = await rc.httpcall(this.submit_url,
|
||||||
{
|
{
|
||||||
method:this.method || 'POST',
|
method:this.method || 'POST',
|
||||||
params:data
|
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 {
|
bricks.HttpJson = class extends bricks.HttpText {
|
||||||
constructor(headers){
|
constructor(headers){
|
||||||
if (!headers)
|
if (!headers)
|
||||||
|
Loading…
Reference in New Issue
Block a user