Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(
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],
}
(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(