UNPKG

ibm-cloud-sdk-core

Version:

Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.

88 lines (41 loc) 1.29 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) &gt; [BaseService](./ibm-cloud-sdk-core.baseservice.md) &gt; [createRequestAndDeserializeResponse](./ibm-cloud-sdk-core.baseservice.createrequestanddeserializeresponse.md) ## BaseService.createRequestAndDeserializeResponse() method Wrapper around `createRequest` that enforces arrived response to be deserialized. **Signature:** ```typescript protected createRequestAndDeserializeResponse(parameters: any, deserializerFn: (any: any) => any, isMap?: boolean): Promise<any>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> parameters </td><td> any </td><td> see `parameters` in `createRequest` </td></tr> <tr><td> deserializerFn </td><td> (any: any) =&gt; any </td><td> the deserializer function that is applied on the response object </td></tr> <tr><td> isMap </td><td> boolean </td><td> _(Optional)_ is `true` when the response object should be handled as a map </td></tr> </tbody></table> **Returns:** Promise&lt;any&gt; a Promise