Print Friendly

# Class Ext.data.HttpProxy

Package: | Ext.data
Class: | HttpProxy
Extends: | Object
Defined In: | HttpProxy.js

An implementation of Ext.data.DataProxy that reads a data object from an Ext.data.Connection object configured to reference a certain URL.

Note that this class cannot be used to retrieve data from a domain other than the domain from which the running page was served.

For cross-domain access to remote data, use an Ext.data.ScriptTagProxy.

Be aware that to enable the browser to parse an XML document, the server must set the Content-Type header to "text/xml".

Properties - Methods - Events

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| HttpProxy(`Object conn`) | HttpProxy
| load(`Object params`, `Ext.data.DataReader) reader`, `Function callback`, `Object scope`, `Object arg`) : void | HttpProxy
Load data from the configured Ext.data.Connection, read the data object into a block of Ext.data.Records using the pa...

## Public Events

This class has no public events.

## Constructor Details

### HttpProxy

`public function HttpProxy(`Object conn`)`
Parameters:

- `conn` : Object
  An Ext.data.Connection object referencing the URL from which the data object is to be read, or a configuration object for an Ext.data.Connection.

## Method Details

### load

`public function load(`Object params`, `Ext.data.DataReader) reader`, `Function callback`, `Object scope`, `Object arg`)`
Load data from the configured Ext.data.Connection, read the data object into a block of Ext.data.Records using the passed Ext.data.DataReader implementation, and process that block using the passed callback.
Parameters:

- `params` : Object
  An object containing properties which are to be used as HTTP parameters for the request to the remote server.
- `reader` : Ext.data.DataReader)
  The Reader object which converts the data object into a block of Ext.data.Records.
- `callback` : Function
  The function into which to pass the block of Ext.data.Records. The function must be passed
  - The Record block object
  - The "arg" argument from the load function
  - A boolean success indicator
- `scope` : Object
  The scope in which to call the callback
- `arg` : Object
  An optional argument which is passed to the callback as its second parameter.

Returns:

- `void`

This method is defined by HttpProxy.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.