update android user agent

This commit is contained in:
wing328
2016-03-14 23:26:26 +08:00
parent be7a49385f
commit 1936af2cab
8 changed files with 1478 additions and 1160 deletions

View File

@@ -83,7 +83,7 @@ public class ApiInvoker {
DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
// Set default User-Agent.
setUserAgent("Android-Java-Swagger");
setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{{artifactVersion}}}/android{{/httpUserAgent}}");
}
public static void setUserAgent(String userAgent) {

View File

@@ -185,7 +185,7 @@ public class ApiInvoker {
public static void initializeInstance(Cache cache, Network network, int threadPoolSize, ResponseDelivery delivery, int connectionTimeout) {
INSTANCE = new ApiInvoker(cache, network, threadPoolSize, delivery, connectionTimeout);
setUserAgent("Android-Volley-Swagger");
setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/{{{artifactVersion}}}/android{{/httpUserAgent}}");
// Setup authentications (key: authentication name, value: authentication).
INSTANCE.authentications = new HashMap<String, Authentication>();