Constructor Summary
| Public Constructor | ||
| public |
constructor(_options: {url: string, port: string, version: string, apiKey: string, JTW: string}, backend: function) This is a constructor of a Rest api javascript |
|
Method Summary
| Public Methods | ||
| public |
This return a default configuration object |
|
| public |
delete(url: string, timeout: number, headers: object, parameters: object, body: object, serviceBaseURL: string): Promise Invoke DELETE action to url specified |
|
| public |
get(url: string, timeout: number, headers: object, parameters: object, asBlob: boolean, serviceBaseURL: string): Promise Invoke GET action to url specified |
|
| public |
patch(url: string, data: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise Invoke PATCH action to url and data specified |
|
| public |
post(url: string, data: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise Invoke POST action to url and data specified |
|
| public |
post_multipart(url: string, formData: FormData, events: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise Invoke POST multipart action to url and data specified |
|
| public |
put(url: string, data: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise Invoke PUT action to url and data specified |
|
| public |
put_multipart(url: string, formData: FormData, events: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise Invoke put multipart action to url and data specified |
|
Public Constructors
Public Methods
public delete(url: string, timeout: number, headers: object, parameters: object, body: object, serviceBaseURL: string): Promise source
Invoke DELETE action to url specified
public get(url: string, timeout: number, headers: object, parameters: object, asBlob: boolean, serviceBaseURL: string): Promise source
Invoke GET action to url specified
public patch(url: string, data: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise source
Invoke PATCH action to url and data specified
public post(url: string, data: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise source
Invoke POST action to url and data specified
public post_multipart(url: string, formData: FormData, events: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise source
Invoke POST multipart action to url and data specified
Params:
| Name | Type | Attribute | Description |
| url | string |
|
url to execute POST |
| formData | FormData | attach data to request POST |
|
| events | object | events allowed, xhr.process |
|
| timeout | number | timeout in milliseconds |
|
| headers | object | headers of request |
|
| parameters | object | parameters of request |
|
| serviceBaseURL | string | base of the uri petition |
public put(url: string, data: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise source
Invoke PUT action to url and data specified
public put_multipart(url: string, formData: FormData, events: object, timeout: number, headers: object, parameters: object, serviceBaseURL: string): Promise source
Invoke put multipart action to url and data specified
Params:
| Name | Type | Attribute | Description |
| url | string |
|
url to execute POST |
| formData | FormData | attach data to request POST |
|
| events | object | events allowed, xhr.process |
|
| timeout | number | timeout in milliseconds |
|
| headers | object | headers of request |
|
| parameters | object | parameters of request |
|
| serviceBaseURL | string | base of the uri petition |