pip-services3-rpc-node
Version:
Remote procedure calls for Pip.Services in Node.js
20 lines (19 loc) • 926 B
TypeScript
/** @module clients */
import { RestClient } from '../clients/RestClient';
/**
* Provides a Rest client for automated tests
*/
export declare class TestRestClient extends RestClient {
constructor(baseRoute: string);
/**
* Calls a remote method via HTTP/REST protocol.
*
* @param method HTTP method: "get", "head", "post", "put", "delete"
* @param route a command route. Base route will be added to this route
* @param correlationId (optional) transaction id to trace execution through call chain.
* @param params (optional) query parameters.
* @param data (optional) body object.
* @param callback (optional) callback function that receives result object or error.
*/
call(method: string, route: string, correlationId?: string, params?: any, data?: any, callback?: (err: any, result: any) => void): void;
}