0
|
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");
|