mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-09-20 15:35:55 +08:00
Merge branch 'related-atta' of devezhao.com:getrebuild/rebuild into related-atta
This commit is contained in:
commit
1acacb76c5
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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!"));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue