HTTP Transport

The HTTP transport uses http requests to communicate.


The HTTP transport is not bundled with Hudson Taylor by default.

To install:

npm install ht-http-transport --save


hoststring “”“”Network address to listen on.
portnumber1234N/ANetwork port to listen on.
pathstring “/endpoint”“/ht”Path to accept requests on.
sslObject { cert, key }N/AEnable SSL
agenthttp.Agent  N/ATo manage connection persistence
timeoutnumber 1800N/ATimeout before the socket is connected


var htHTTPTransport = require('ht-http-transport')
var http = require('http')

var keepAliveAgent = new http.Agent({ keepAlive: true })
var transport = new ht.Transport.HTTP({
  host: "",
  port: 1337,
  path: "/endpoint",
  ssl: {
    cert: "...",
    key: "..."
  agent: keepAliveAgent,
  timeout: 1000