I recently made a Ruby on Rails app that parses and extracts a atom feed. I extract some fields like: person name, message and avatar-image link.
The problem is that the link for the avatar looks like this:
https://foo.atlassian.net/secure/useravatar?ownerId=foo.bar&avatarId=10302&s=48
If i’m logged on on the site from which I got the url for the image and I access the url in my browser, the image shows up. If I end the session (log out, open in other browser in which i’m not logged in etc.) it doesn’t show up (actually it shows a default-no-avatar image).
How can I send some information to the server so I can authenticate and get the desired image? (I don’t want to store the images – and I have a dummy account that I can use to authenticate).
Use
Net::HTTPwith SSL. Example taken from the Ruby STDLib Docs: