Page MenuHomeGitPull.it

class JX.Request
Javelin Documentation ()

Make basic AJAX XMLHTTPRequests.

Tasks

Builtin Events

  • invoke(type, more) — Invoke a class event, notifying all listeners. You must declare the events your class invokes when you install it; see @{function:JX.install} for documentation. Any arguments you provide will be passed to listener callbacks.
  • static listen(type, callback) — Static listen interface for listening to events produced by any instance of this class. See @{method:listen} for documentation.

Other Methods

Methods

invoke(type, more)
Inherited

JX.Base

Invoke a class event, notifying all listeners. You must declare the events your class invokes when you install it; see JX.install() for documentation. Any arguments you provide will be passed to listener callbacks.

Parameters
stringtypeEvent type, must be declared when class is installed.
...moreZero or more arguments.
Return
JX.EventEvent object which was dispatched.

static listen(type, callback)
Inherited

JX.Base

Listen for events emitted by this object instance. You can also use the static flavor of this method to listen to events emitted by any instance of this object.

See also listen() in JX.Stratcom.

JX.Base

Static listen interface for listening to events produced by any instance of this class. See listen() for documentation.

Parameters
stringtypeType of event to listen for.
functioncallbackFunction to call when this event occurs.
Return
objectA reference to the installed listener. You can later remove the listener by calling this object's remove() method.

construct(uri, handler)

This method is not documented.
Parameters
uri
handler
This method is not documented.
This method is not documented.
This method is not documented.
This method is not documented.
This method is not documented.
This method is not documented.

private _onuploadprogress(progress)

This method is not documented.
Parameters
progress
This method is not documented.

private _extractResponse(xport)

This method is not documented.
Parameters
xport

private _fail(error)

This method is not documented.
Parameters
error

private _done(response)

This method is not documented.
Parameters
response

private _cleanup()

This method is not documented.

setData(dictionary)

This method is not documented.
Parameters
dictionary

addData(dictionary)

This method is not documented.
Parameters
dictionary

setDataWithListOfPairs(list_of_pairs)

This method is not documented.
Parameters
list_of_pairs

private _handleResponse(response)

This method is not documented.
Parameters
response

static defaultDataSerializer(list_of_pairs)

This method is not documented.
Parameters
list_of_pairs

private static _parseResponsePayload(parent, index)

When we receive a JSON blob, parse it to introduce meaningful objects where there are magic keys for placeholders.

Objects with the magic key '__html' are translated into JX.HTML objects.

This function destructively modifies its input.

Parameters
parent
index
Defined
lib/Request.js:20
Extends
JX.Base