eldur / jwbf

Java Wiki Bot Framework is a library to maintain Wikis like Wikipedia based on MediaWiki.
http://jwbf.sourceforge.net/
Apache License 2.0
78 stars 33 forks source link

Changing user-agent #7

Closed reignerok closed 10 years ago

reignerok commented 10 years ago

I think it would be a good idea if user-agent would be customizable. I'm actually trying to do it with your base code but I find it very hard to do without changing the code.

eldur commented 10 years ago

Hmm you are right about that.

What do you think, if we add a function like this?

new MediaWikiBot(HttpActionClient.withUserAgent(agentString).of(url));
reignerok commented 10 years ago

I think that's better than nothing. However, I'll personally go for an optional parameter on the constructor. Something like:

new MediaWikiBot(URL/String url, String userAgent);
new MediaWikiBot(HttpActionClient client, String userAgent);

Anyway, as long as it is customizable I think it will be OK.

eldur commented 10 years ago

Do you need a final build in public maven repository?

reignerok commented 10 years ago

No, I can wait for it. I will work on other parts in the meanwhile :)