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 client (34)
- rome user agent (7)
- rome user-agent (5)
- rome useragent (4)
- agent rome (2)
- selenium change user agent (2)
- user agent Rome Client (2)
- Rome Client user-agent (2)
- feedfetcher rome (2)
- rome syndfeed user agent (1)