How to use the putOrPost function from request
Find comprehensive JavaScript request.putOrPost code examples handpicked from public code repositorys.
105 106 107 108 109 110 111 112 113 114 115
data[widget.name] = widget.value; } } }); Request.putOrPost("/scenarios", scenario.id, { scenario: data }, resp => m.route.set("/scenarios/" + resp.data.id)); };
1
1
0
+ 3 other calls in file
298 299 300 301 302 303 304 305 306 307 308
}); }; //======================================================================== const submitResourceForm = () => { Request.putOrPost("/scenarios/" + scenario().id + "/resource", resourceId(), { resource: { id: resourceId() ? resourceId() : null,
1
1
0
GitHub: dptww1/sbg_inv_fe
346 347 348 349 350 351 352 353 354 355
if (!character.name) { Request.errors("Name is required"); return; } Request.putOrPost( "/character", character.id, { character: character }, () => {
1
1
0
GitHub: dptww1/sbg_inv_fe
25 26 27 28 29 30 31 32 33 34
if (!figure.name) { Request.errors("Name is required!"); return; } Request.putOrPost("/figure", figure.id, { figure: figure }, () => { Request.messages("Saved " + figure.name);
1
1
0
request.get is the most popular function in request (2246 examples)