Clear Up
SharpKit Reference

Connection Class


Base Types



Name Description
abort(object) Aborts any outstanding request. @param {Object} request (Optional) defaults to the last request
cleanup(object) Cleans up any left over information from the request @private @param {Object} The request
clearTimeout(object) Clears the timeout on the request @private @param {Object} The request
createException(object) Creates the exception object @private @param {Object} request
createResponse(object) Creates the response object @private @param {Object} request
getForm(object) Gets the form object from options. @private @param {Object} options The request options @return {HTMLElement} The form, null if not passed
isFormUpload(object) Detects whether the form is intended to be used for an upload. @private
isLoading(object) Determines whether this object has a request outstanding. @param {Object} request (Optional) defaults to the last transaction @return {Boolean} True if there is an outstanding request.
onComplete(object) To be called when the request has come back from the server @private @param {Object} request @return {Object} The response
onStateChange(object) Fires when the state of the xhr changes @private @param {Object} request The request
onUploadComplete(object, object)
parseStatus(JsNumber) Checks if the response status was successful @param {Number} status The status code @return {Object} An object containing success/status state
setOptions(object, object) Sets various options such as the url, params for the request @param {Object} options The initial options @param {Object} scope The scope to execute in @return {Object} The params for the request
setupHeaders(object, object, object, object) Setup all the headers for the request @private @param {Object} xhr The xhr object @param {Object} options The options for the request @param {Object} data The data for the request @param {Object} params The params for the request
setupMethod(object, JsString) Template method for overriding method @private @param {Object} options @param {String} method @return {String} The modified method
setupParams(object, JsString) Template method for overriding params @private @param {Object} options @param {String} params @return {String} The modified params
setupUrl(object, JsString) Template method for overriding url @private @param {Object} options @param {String} url @return {String} The modified url
upload(object, JsString, JsString, object) Uploads a form using a hidden iframe. @param {String/HTMLElement/Ext.Element} form The form to upload @param {String} url The url to post to @param {String} params Any extra parameters to pass @param {Object} options The initial options


Name Description
defaultPostHeader @cfg {Object} extraParams Any parameters to be appended to the request.
disableCaching @cfg {Boolean} disableCaching True to add a unique cache-buster param to GET requests. (defaults to true)
disableCachingParam @cfg {String} disableCachingParam Change the parameter which is sent went disabling caching through a cache buster. Defaults to '_dc'
timeout @cfg {Number} timeout The timeout in milliseconds to be used for requests. (defaults to 30000)
useDefaultHeader @cfg {Object} extraParams Any parameters to be appended to the request.
© Copyright 2005-2011 SharpKit. All rights reserved.