dashboard-js-devexpress-dot-dashboard-356a220a.md
The Fetch-based remote service used to communicate with the server side.
export class FetchRemoteService implements IRemoteService<JQueryPromise<any>>
The Fetch remote service is a default IRemoteService<TResponse> implementation that exchanges information between client and server sides. You can get different information from a server (data sources, export information, a dashboard model), obtain a dashboard request time, pass custom HTTP headers and more.
Refer to the following topics for information on how to set the server’s URL and pass a custom Authorization header from the client:
You can also view the following example on GitHub:
View Example: ASP.NET Core Dashboard - How to implement authentication
Refer to the FetchRemoteServiceOptions class for Fetch remote service options.
You can use Web Forms, MVC, and ASP.NET Core dashboard applications as a client for a server part. See the following topic to learn more: DashboardBackendOptions.
IRemoteService
Initializes a new instance of the FetchRemoteService class with specified settings.
constructor(
options?: DevExpress.Dashboard.FetchRemoteServiceOptions
)
| Name | Type |
|---|---|
| options | FetchRemoteServiceOptions |
Specifies a pre-request callback function that allows you to modify the options parameter before the request is sent.
beforeSend: (settings: RequestInit) => void
| Type | Description |
|---|---|
| (settings: RequestInit) => void |
A function that can be used to modify the options parameter before the Fetch request is sent.
|
Specifies an object with additional headers (key/value pairs) to send along with requests.
headers: {
[key: string]: any;
}
| Type | Description |
|---|---|
| [key: string]: any |
A collections of header key/value pairs.
|
Requests data from the server using the GET method.
getFromServer(
url: string,
data?: Object,
queryOptions?: Object,
abortController?: AbortController
): JQueryPromise<any>
| Name | Type | Description |
|---|---|---|
| url | string |
A string containing the URL to which the request is sent.
| | data | Object |
Data to be sent to the server.
| | queryOptions | Object |
An object that contains query options.
| | abortController | AbortController |
An AbortController object that allows you to abort one or more Web requests.
|
| Type | Description |
|---|---|
| JQueryPromise<any> |
A JQuery Promise object that is resolved after the action is completed.
|
Performs an export request to the server using the POST method.
performPostback(
url: string,
args: any,
abortController?: AbortController
): JQueryPromise<any>
| Name | Type | Description |
|---|---|---|
| url | string |
A string containing the URL to which the request is sent.
| | args | any |
An object that contains request options.
| | abortController | AbortController |
An AbortController object that allows you to abort one or more Web requests.
|
| Type | Description |
|---|---|
| JQueryPromise<any> |
A JQuery Promise object that is resolved after the action is completed.
|
Posts data to the server using the POST method.
postToServer(
url: string,
data?: Object,
abortController?: AbortController
): JQueryPromise<any>
| Name | Type | Description |
|---|---|---|
| url | string |
A string containing the URL to which the request is sent.
| | data | Object |
Data to be sent to the server.
| | abortController | AbortController |
An AbortController object that allows you to abort one or more Web requests.
|
| Type | Description |
|---|---|
| JQueryPromise<any> |
A JQuery Promise object that is resolved after the action is completed.
|