If you are trying to use Rome and Rome Feed Fetcher, you may want to change the user agent. However, the following will not change the default user agent:
FeedFetcher feedFetcher = new HttpURLFeedFetcher();
feedFetcher.setUserAgent("User Agent 007");
SyndFeed feed = null;
feedURL = new URL(rssUrl);
feed = feedFetcher.retrieveFeed(feedURL);
List entries = feed.getEntries();
To change the user agent you must use the InfoCache as shown:
FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
FeedFetcher feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
feedFetcher.setUserAgent("User Agent 007");
SyndFeed feed = null;
feedURL = new URL(rssUrl);
feed = feedFetcher.retrieveFeed(feedURL);
List entries = feed.getEntries();
Otherwise the User agent is set to “Java/1.5.0_04″. This is odd because the default client for Rome is “Rome Client (http://tinyurl.com/64t5n) Ver: 0.7″. It seems like an attempt to change the user agent without having a HashMapFeedInfoCache will result in changing the user agent, but somehow it reverts to “Java/1.5.0_04″ instead of whatever you set it to.
People Found This When Looking For:
- rome user-agent (3)
- agent rome (1)
- feedfetcher rome (1)
- Rome client (1)
- Rome Client ( (1)
- rome client http://tinyurl com/64t5n (1)
- tinyurl and user agent and rome (1)
- user agent rome (1)
- user agent Rome Client (1)