Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

thtp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thtp

A THTP client library implementing Thrift-RPC over standard persistent HTTP connections

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

thtp-js

Client

The THTP client requires Thrift definitions which have been augmented to expose the args and result structs for each RPC. This can be achieved by adding a step to the Thrift compilation process: once thrift has been run and js:node definitions have been created, run

# Set to wherever your definitions are outputted
output_dir=target/gen-nodejs
# Modify files (saving originals as *.bak)
find $output_dir -iname '*Service.js' -type f -exec sed -i.bak -E 's/^var ([A-Za-z0-9_]*(_args|_result)) =/var \1 = exports.\1 =/' {} \;

For each rpc Service.do_action, this will export Service_do_thing_args and Service_do_thing_result, the structs that Thrift-RPC uses under the hood to manage request/response bodies.

Keywords

FAQs

Package last updated on 18 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc