Mercurial > nebulaweb3
comparison default/node_modules/shoestring/src/ajax/post.js @ 0:1d038bc9b3d2 default tip
Up:default
author | Liny <dev@neowd.com> |
---|---|
date | Sat, 31 May 2025 09:21:51 +0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1d038bc9b3d2 |
---|---|
1 //>>excludeStart("exclude", pragmas.exclude); | |
2 define([ "shoestring", "ajax/ajax" ], function( shoestring ) { | |
3 //>>excludeEnd("exclude"); | |
4 | |
5 /** | |
6 * Helper function wrapping a call to [ajax](ajax.js.html) using the `POST` method. | |
7 * | |
8 * @param {string} url The url to POST to. | |
9 * @param {object} data The data to send. | |
10 * @param {function} callback Callback to invoke on success. | |
11 * @return shoestring | |
12 * @this shoestring | |
13 */ | |
14 shoestring.post = function( url, data, callback ){ | |
15 return shoestring.ajax( url, { data: data, method: "POST", success: callback } ); | |
16 }; | |
17 | |
18 //>>excludeStart("exclude", pragmas.exclude); | |
19 }); | |
20 //>>excludeEnd("exclude"); |