I’m trying to fetch a subreddit RSS feed from my Go application but I get the response code “403 Forbidden” every time and a message to contact support through email.
The weird thing is the request works if I do it directly in an HTTP client
GET https://reddit.com/r/investimentos/best/.rss?sort=new
User-Agent: MyRssClient/1.0 (Operated by BurnInNoia)
But using Go it fails with the message:
If you’re supplying an alternate User-Agent string, try changing back to default as that can sometimes result in a block.
req, _ := http.NewRequest(http.MethodGet, url, nil)
req.Header.Set("User-Agent", "MyRssClient/1.0 (Operated by BurnInNoia)")
resp, err := u.client.Do(req)
Does anyone have done it before?