Constructor Detail
bbq.ajax.JSONRequest(options, options)
Name | Type | Comment |
---|---|---|
options | {Object} | |
options |
Extends
bbq.ajax.AJAXRequest.
Defined in: JSONRequest.js.
new bbq.ajax.JSONRequest({
// The URL to send the request to - can be relative
url: "/some/path",
// The arguments to send - N.B. will be JSON serialized
args: {
foo: "bar"
}
// Invoked on success.
// The first argument is the XMLHTTPRequest object,
// the second is the deserialized server response
onSuccess: function(serverResponse, json) {
},
// Invoked when the request fails - eg. a X-BBQ-ResponseCode
// header is sent with a negative value
onFailure: function() {
}
});
Constructor Attributes | Constructor Name and Description |
---|---|
bbq.ajax.JSONRequest(options, options)
Sends an asynchronous HTTP request to a server.
|
Name | Type | Comment |
---|---|---|
options | {Object} | |
options |