To load and import data from a remote URL. Server storage uses fetch API to send the call and fetch the data.

urlServer base URLstring
method optionalHTTP methodstringGET, POST, etc
headers optionalHTTP headersHeadersInit{ 'Accept-Charset': 'utf-8', 'X-My-Custom-Header': 'cool' }
body optionalHTTP Body payloadBodyInit{ 'loginId': 'gridjs', 'password': 'd4da' }
then optionalFunction to refine/select attributesFunction(data) => [,]
handle optionalFunction to handle the responseFunction(res) => res.json()
total optionalFunction to set the total recordsFunction(data) =>
new Grid({
columns: ['Name', 'Language', 'Released At', 'Artist'],
server: {
url: '',
then: data => => [, card.lang, card.released_at, card.artist]),
handle: (res) => {
// no matching records found
if (res.status === 404) return {data: []};
if (res.ok) return res.json();
throw Error('oh no :(');
Last updated on by Afshin Mehrabani