Using with Discord webhooks
Is it possible to use this server to send POST requests to discord webhooks?
I recently tried using the following URL http://localhost:3000/api/webhooks/my_webhook, this is replacing https://discord.com/api/webhooks/my_webhook with http://localhost:3000 as the base.
The post request failed, and this is the log from the server
2022-08-15T04:33:41.681536Z INFO twilight_http_proxy: Listening on http://0.0.0.0:3000
2022-08-15T04:33:51.290020Z ERROR twilight_http_proxy: Error when requesting the Discord API: hyper::Error(Connect, ConnectError("dns error", ResolveError { kind: Proto(ProtoError { kind: Io(Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }) }) }))
this is the response by the http_client
Response: Method - POST Url - http://localhost:3000/api/webhooks/my_webhool - Status 502 - Headers - Headers({'content-length': '44', 'date': 'Mon, 15 Aug 2022 04:33:51 GMT'})
I'm processing a queue of messages where each message contains a Discord Webook for its destination (these webhooks are from different accounts that are not owned by myself.)
I have the same use case and can confirm I am experiencing the same issue as well. 502 responses happens for most of the requests with a webhook.
does this happen only with some webhook executions or all of them?
Not all of them, it seems to be happening randomly.
thats odd, do you have debug tracing enabled? it'd be useful to see if this is happening with a pattern of requests
I don't, but I will turn it on and let you know what I get from it.