add version tag in internet lib

This commit is contained in:
FalsePattern committed 2022-06-15 20:13:01 +02:00
1 parent ad66bad2fc
commit 0848ee113f
1 file changed
+2 -1
@@ -14,7 +14,8 @@ public class Internet {
val connection = (HttpURLConnection) URL.openConnection();
connection.setConnectTimeout(3500);
connection.setReadTimeout(5000);
connection.setRequestProperty("User-Agent", "FalsePatternLib Internet Connector");
connection.setRequestProperty("User-Agent", Tags.MODNAME + " " + Tags.VERSION + " Internet Connector" +
" (https://github.com/FalsePattern/FalsePatternLib)");
if (connection.getResponseCode() != 200) {
onError.accept(new Exception("HTTP response code " + connection.getResponseCode()));
} else {