transport Object
The configuration used to load and save the data items. A data source is remote or local based on the way it retrieves data items.
Remote data sources load and save data items from and to a remote end-point (also known as remote service or server). The transport
option describes the remote service configuration - URL, HTTP verb, HTTP headers, and others. The transport
option can also be used to implement custom data loading and saving.
Local data sources are bound to a JavaScript array via the data option.
Example - specify the remote service configuration
<script>
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "https://demos.telerik.com/kendo-ui/service/products",
dataType: "jsonp" // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
}
}
});
dataSource.fetch(function() {
var products = dataSource.data();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(products[0].ProductName); // displays "Chai"
});
</script>
Related Properties
- transport.batch
- transport.batch.url
- transport.cache
- transport.destroy
- transport.destroy.cache
- transport.destroy.contentType
- transport.destroy.data
- transport.destroy.dataType
- transport.destroy.type
- transport.destroy.url
- transport.parameterMap
- transport.create
- transport.create.cache
- transport.create.contentType
- transport.create.data
- transport.create.dataType
- transport.create.type
- transport.create.url
- transport.push
- transport.signalr
- transport.signalr.client
- transport.signalr.client.create
- transport.signalr.client.destroy
- transport.signalr.client.read
- transport.signalr.client.update
- transport.signalr.hub
- transport.signalr.promise
- transport.signalr.server
- transport.signalr.server.create
- transport.signalr.server.destroy
- transport.signalr.server.read
- transport.signalr.server.update
- transport.submit
- transport.update
- transport.update.cache
- transport.update.contentType
- transport.update.data
- transport.update.dataType
- transport.update.type
- transport.update.url