mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add appropriate User Agent
This commit is contained in:
parent
a89e2c8214
commit
b37f1f3b21
1 changed files with 1 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ public class CommonsApplication extends Application {
|
|||
|
||||
public static MWApi createMWApi() {
|
||||
DefaultHttpClient client = new DefaultHttpClient();
|
||||
client.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "Commons/" + APPLICATION_VERSION + " (https://mediawiki.org/wiki/Apps/Commons) Android/" + Build.VERSION.RELEASE);
|
||||
return new MWApi(API_URL, client);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue