Skip to content
XMLHttpRequest Wrapper
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
sample
src
.gitignore
readme.md

readme.md

Request

XMLHttpRequest Wrapper

Dependencies(es6)

None

https://dependencies.arnaud-nicolas.fr/?need=Request.es6

Dependencies (es5)

  • Class
  • EventDispatcher
  • Event

https://dependencies.arnaud-nicolas.fr/?need=Request

Example

function completeHandler(pEvent)
{
	console.log('completeHandler', pEvent);
}

function errorHandler(pEvent)
{
	console.log('errorHandler', pEvent);
}

/**
 * Requête correcte
 */
var url = "index.html";
var params = {};
var method = 'get';//or post
var req = new Request(url, params, method);
req.addEventListener(Event.COMPLETE, completeHandler, false);

/**
 * Requête déclenchant une erreur
 */
url = "404.html";
req = new Request(url, params, method);
req.addEventListener(Event.COMPLETE, completeHandler, false);
req.addEventListener(RequestEvent.ERROR, errorHandler, false);
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.