Skip to main content

JSON Method Plugin Service

Overview

The JsonMethodPluginService provides methods to call JSON plugins using HTTP GET and POST requests.

post

post<U>(method: string, query: U, options?: Options): Observable<any>

Parameters

ParameterTypeDescription
methodstringThe name of the JSON plugin method to call.
queryUParameters to pass to the plugin.
optionsOptionsHTTP options for the request.

Returns

TypeDescription
Observable<any>An observable of the plugin's return value.

Example

const service = new JsonMethodPluginService();
service.post('exampleMethod', { param1: 'value1' }).subscribe(response => {
console.log(response);
});

get

get<U extends Record<string, string | boolean | number | Date | object | undefined>>
(method: string, query: U, options?: Options): Observable<any>

Parameters

ParameterTypeDescription
methodstringThe name of the JSON plugin method to call.
queryUParameters to pass to the plugin.
optionsOptionsHTTP options for the request.

Returns

TypeDescription
Observable<any>An observable of the plugin's return value.

Example

const service = new JsonMethodPluginService();
service.get('exampleMethod', { param1: 'value1' }).subscribe(response => {
console.log(response);
});