Create wt-odlux directory
[ccsdk/features.git] / sdnr / wt-odlux / odlux / framework / src / models / restService.ts
1 /**
2  * ============LICENSE_START========================================================================
3  * ONAP : ccsdk feature sdnr wt odlux
4  * =================================================================================================
5  * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
6  * =================================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8  * in compliance with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software distributed under the License
13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14  * or implied. See the License for the specific language governing permissions and limitations under
15  * the License.
16  * ============LICENSE_END==========================================================================
17  */
18
19 /**
20   * The PlainObject type is a JavaScript object containing zero or more key-value pairs.
21   */
22 export interface PlainObject<T = any> {
23   [key: string]: T;
24 }
25
26 export interface AjaxParameter {
27   /**
28     * The HTTP method to use for the request (e.g. "POST", "GET", "PUT").
29     */
30   method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'OPTIONS' | 'PATCH';
31   /**
32     * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest
33     * transport. The header X-Requested-With: XMLHttpRequest is always added, but its default
34     * XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from
35     * within the beforeSend function.
36     */
37   headers?: PlainObject<string | null | undefined>;
38   /**
39     * Data to be sent to the server. It is converted to a query string, if not already a string. It's
40     * appended to the url for GET-requests. See processData option to prevent this automatic processing.
41     * Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same
42     * key based on the value of the traditional setting (described below).
43     */
44   data?: PlainObject | string;
45 }
46
47
48