6 Star 10 Fork 0

Gitee 极速下载/dojo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/dojo/dojo
克隆/下载
request.js 2.55 KB
一键复制 编辑 原始数据 按行查看 历史
Dylan Schiemann 提交于 2012-08-24 14:06 . refs #13101, clean-up docs
define([
'./request/default!'/*=====,
'./_base/declare',
'./promise/Promise' =====*/
], function(request/*=====, declare, Promise =====*/){
/*=====
request = function(url, options){
// summary:
// Send a request using the default transport for the current platform.
// url: String
// The URL to request.
// options: dojo/request.__Options?
// Options for the request.
// returns: dojo/request.__Promise
};
request.__Promise = declare(Promise, {
// response: dojo/promise/Promise
// A promise resolving to an object representing
// the response from the server.
});
request.__BaseOptions = declare(null, {
// query: String|Object?
// Query parameters to append to the URL.
// data: String|Object?
// Data to transfer. This is ignored for GET and DELETE
// requests.
// preventCache: Boolean?
// Whether to append a cache-busting parameter to the URL.
// timeout: Integer?
// Milliseconds to wait for the response. If this time
// passes, the then the promise is rejected.
// handleAs: String?
// How to handle the response from the server. Default is
// 'text'. Other values are 'json', 'javascript', and 'xml'.
});
request.__MethodOptions = declare(null, {
// method: String?
// The HTTP method to use to make the request. Must be
// uppercase.
});
request.__Options = declare([request.__BaseOptions, request.__MethodOptions]);
request.get = function(url, options){
// summary:
// Send an HTTP GET request using the default transport for the current platform.
// url: String
// URL to request
// options: dojo/request.__BaseOptions?
// Options for the request.
// returns: dojo/request.__Promise
};
request.post = function(url, options){
// summary:
// Send an HTTP POST request using the default transport for the current platform.
// url: String
// URL to request
// options: dojo/request.__BaseOptions?
// Options for the request.
// returns: dojo/request.__Promise
};
request.put = function(url, options){
// summary:
// Send an HTTP POST request using the default transport for the current platform.
// url: String
// URL to request
// options: dojo/request.__BaseOptions?
// Options for the request.
// returns: dojo/request.__Promise
};
request.del = function(url, options){
// summary:
// Send an HTTP DELETE request using the default transport for the current platform.
// url: String
// URL to request
// options: dojo/request.__BaseOptions?
// Options for the request.
// returns: dojo/request.__Promise
};
=====*/
return request;
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mirrors/dojo.git
[email protected]:mirrors/dojo.git
mirrors
dojo
dojo
master

搜索帮助