Closed rivendell-tech closed 1 year ago
Just to clarify...
It's TradingView that's sending a different content-type as header if there's a newline or not?
...or do you mean discord is interpreting as text/json based on the payload given to it?
I don't think it's adding a newline in the code..Is it's something to do with your YAML configuration which has YAML adding a new line?
It's TradingView that's sending a different content-type as header if there's a newline or not?
Yes, Tradingview is sending ContentType:text/plain
if there's a new line and ContentType:application/json
, as it should, if there's not.
Is it's something to do with your YAML configuration which has YAML adding a new line?
There's no a new line or a space after the closing brace in the yaml file.
As reference, the reply from Tradingview support:
From your tradingview-alerts-home
directory, run the following:
npm install @alleyway/add-tradingview-alerts-tool@beta
Please report back if it's working okay and I will push a release.
Perfectly, you can proceed. :pray:
🖖 live long & prosper
Hi @mlake when adding a custom message to the alert, it is added a new line by default. So the content is parsed as
ContentType:text/plain
instead ofContentType:application/json
, resulting in a 400 Bad Request on Tradingview when using Discord webhooks.Tradingview support confirms they're planning to ignore this, but there's no ETA at the moment.
Is there a way to fix this behavior or avoid it? At the moment I have to manually delete the new line on each alert, then it works correctly.