How to use the @creditkarma/thrift-server-core.readThriftObject function in @creditkarma/thrift-server-core

To help you get started, we’ve selected a few @creditkarma/thrift-server-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github creditkarma / thrift-server / packages / thrift-client-ttwitter-filter / src / main / ThriftClientTTwitterFilter.ts View on Github external
(
                                        res: IRequestResponse,
                                    ): Promise => {
                                        return readThriftObject<
                                            TTwitter.IResponseHeader
                                        >(
                                            res.body,
                                            TTwitter.ResponseHeaderCodec,
                                            transportType,
                                            protocolType,
                                        ).then(
                                            (result) => {
                                                return {
                                                    statusCode: res.statusCode,
                                                    headers: {
                                                        thriftContext:
                                                            result[0],
                                                    },
                                                    body: result[1],
                                                }
github creditkarma / thrift-server / packages / thrift-client-context-filter / src / main / ThriftClientContextFilter.ts View on Github external
(response: IRequestResponse): Promise => {
                        return readThriftObject(
                            response.body,
                            ResponseCodec,
                            transportType,
                            protocolType,
                        ).then(
                            (result: [any, Buffer]): IRequestResponse => {
                                return {
                                    statusCode: response.statusCode,
                                    headers: {
                                        thriftContext: result[0],
                                    },
                                    body: result[1],
                                }
                            },
                            (err: any) => {
                                logger(