-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add a user agent #1
Conversation
@stchris !! Good to hear from you! And even better that the tiny app is helping you 😁 Couple of questions from my side:
Would gladly pull it in as is, the only tiny change I think I could recommend I added as a comment. What do you think? should I just merge the PR and move the line or do you feel like moving it? 😉 |
main.go
Outdated
@@ -218,7 +221,13 @@ type AtomEntry struct { | |||
|
|||
func downloadFeed(url string) ([]byte, error) { | |||
log.Printf("downloading feed %#v\n", url) | |||
resp, err := http.Get(url) | |||
client := http.Client{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what the vim incantation is, but i'd move this closer to it's first use via client.Do
-- say m5
or something should do it in vim? 😜
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Done!
(I used a hex editor, vim is too high level for me)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that's hexl-mode? 😝
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think i'm missing the actual move?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🦅 👁️ ... commit
without add
will do that 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😉 cheers!
Yes, that helped. I suppose there are still some rate limits and there's no way you can use OAuth in an rss reader like they describe in https://github.com/reddit-archive/reddit/wiki/API.
Yes, the test seems out of context because I first suspected some parsing error so I started writing a basic test. I'm happy to split up the PR into multiple ones (or refactor the commits).
I like to move it, move it ... |
Agreed, OAuth is a bit out of scope at this point.
Nah, I don't mind - if you feel like it, sure, but I'd pull the changes in as is as well 👍
I'd like to see the way you move..... |
🙏 thanks a lot, again @stchris ! |
Hallo 👋
I'm loving this project. While trying to set up some reddit feeds, I stumbled across a request limit very fast and it seems like adding a user agent is a good thing anyway.