File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/main/java/net/hexonet/apiconnector Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -137,14 +137,16 @@ public String getURL() {
137
137
*
138
138
* @param str user agent label
139
139
* @param rv user agent revision
140
+ * @return Current APIClient instance for method chaining
140
141
*/
141
- public void setUserAgent (String str , String rv ) {
142
+ public APIClient setUserAgent (String str , String rv ) {
142
143
String jv = System .getProperty ("java.vm.name" ).toLowerCase ().replaceAll (" .+" , "" );
143
144
String jrv = System .getProperty ("java.version" );
144
145
String arch = System .getProperty ("os.arch" );
145
146
String os = System .getProperty ("os.name" );
146
147
this .ua = (str + " (" + os + "; " + arch + "; rv:" + rv + ") java-sdk/" + this .getVersion ()
147
148
+ " " + jv + "/" + jrv );
149
+ return this ;
148
150
}
149
151
150
152
/**
You can’t perform that action at this time.
0 commit comments