@awayjs/core
Version:
AwayJS core classes
52 lines (50 loc) • 1.14 kB
JavaScript
import { URLRequestMethod } from '../net/URLRequestMethod';
var URLRequest = /** @class */ (function () {
/**
* @param url
*/
function URLRequest(url) {
if (url === void 0) { url = null; }
/**
*
* away.net.URLRequestMethod.GET
* away.net.URLRequestMethod.POST
*
* @type {string}
*/
this.method = URLRequestMethod.GET;
/**
* Use asynchronous XMLHttpRequest
* @type {boolean}
*/
this.async = true;
this._url = url;
}
Object.defineProperty(URLRequest.prototype, "url", {
/**
*
* @returns {string}
*/
get: function () {
return this._url;
},
/**
*
* @param value
*/
set: function (value) {
this._url = value;
},
enumerable: false,
configurable: true
});
/**
* dispose
*/
URLRequest.prototype.dispose = function () {
this.data = null;
this._url = null;
};
return URLRequest;
}());
export { URLRequest };