Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using with Discord webhooks #58

Open
Corfucinas opened this issue Aug 15, 2022 · 5 comments
Open

Using with Discord webhooks #58

Corfucinas opened this issue Aug 15, 2022 · 5 comments

Comments

@Corfucinas
Copy link

Corfucinas commented Aug 15, 2022

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

@Corfucinas Corfucinas changed the title Using with webhooks Using with Discord webhooks Aug 15, 2022
@PredaaA
Copy link

PredaaA commented Jul 29, 2023

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.

@laralove143
Copy link
Member

does this happen only with some webhook executions or all of them?

@PredaaA
Copy link

PredaaA commented Jul 29, 2023

Not all of them, it seems to be happening randomly.

@laralove143
Copy link
Member

thats odd, do you have debug tracing enabled? it'd be useful to see if this is happening with a pattern of requests

@PredaaA
Copy link

PredaaA commented Jul 29, 2023

I don't, but I will turn it on and let you know what I get from it.

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

No branches or pull requests

3 participants