Merge branch 'related-atta' of devezhao.com:getrebuild/rebuild into related-atta

This commit is contained in:
devezhao 2022-01-19 18:11:02 +08:00
commit 1acacb76c5
2 changed files with 8 additions and 5 deletions

View file

@ -34,9 +34,12 @@ public class HttpUtils {
private static OkHttpClient okHttpClient = null;
private static final String RB_UA =
String.format("RB/%s (%s/%s)", Application.VER, SystemUtils.OS_NAME, SystemUtils.JAVA_SPECIFICATION_VERSION);
private static final String RB_LANG = Locale.getDefault().toString(); // zh_CN
private static final String RB_UA = String.format("RB/%s (%s/%s)",
Application.VER, SystemUtils.OS_NAME, SystemUtils.JAVA_SPECIFICATION_VERSION);
private static final Locale l = Locale.getDefault();
private static final String RB_LANG = l.getLanguage() + "_" + l.getCountry();
private static String RB_CI;
/**

View file

@ -18,7 +18,7 @@ class HttpUtilsTest {
@Test
void get() throws Exception {
System.out.println(HttpUtils.get("http://webhook.site/87ae9186-809e-4d65-a8af-346d0c07e46a"));
System.out.println(HttpUtils.post("http://webhook.site/87ae9186-809e-4d65-a8af-346d0c07e46a", null));
System.out.println(HttpUtils.get("https://webhook.site/56f4a259-ba64-4f0b-9313-11a64775356a"));
System.out.println(HttpUtils.post("https://webhook.site/56f4a259-ba64-4f0b-9313-11a64775356a", "Hello! I'm RB!"));
}
}