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

How to use timeout poison? #69

Open
andyhush-athena opened this issue Dec 30, 2022 · 0 comments
Open

How to use timeout poison? #69

andyhush-athena opened this issue Dec 30, 2022 · 0 comments

Comments

@andyhush-athena
Copy link

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."

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant