Skip to content
This repository was archived by the owner on Nov 19, 2023. It is now read-only.
This repository was archived by the owner on Nov 19, 2023. It is now read-only.

How to use timeout poison? #69

Description

@andyhush-athena

I can't seem to get anywhere with the timeout poison:
`var toxy = require('toxy')
var poisons = toxy.poisons
var rules = toxy.rules

// Create a new toxy proxy
const proxy = toxy({
forwardHost: true,
})

// Default server to forward incoming traffic
proxy
.forward('http://httpbin.org')

proxy
.routeAll()

proxy
.all('/*')
.poison(poisons.timeout(5000))

proxy.listen(3000)
console.log('Server listening on port:', 3000)
`

The only result I ever get is "localhost didn’t send any data."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions