dm-97
This commit is contained in:
parent
9cda67660b
commit
5678b0b072
2 changed files with 2 additions and 8 deletions
|
|
@ -36,7 +36,7 @@ object NetworkModule {
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideRetrofit(moshi: Moshi, okHttpClient: OkHttpClient): Retrofit {
|
fun provideRetrofit(moshi: Moshi, okHttpClient: OkHttpClient): Retrofit {
|
||||||
return Retrofit.Builder()
|
return Retrofit.Builder()
|
||||||
.baseUrl("https://192.168.0.217/")
|
.baseUrl("http://192.168.0.217/")
|
||||||
.client(okHttpClient) // 關鍵:將攔截器綁定到 Retrofit
|
.client(okHttpClient) // 關鍵:將攔截器綁定到 Retrofit
|
||||||
.addConverterFactory(MoshiConverterFactory.create(moshi))
|
.addConverterFactory(MoshiConverterFactory.create(moshi))
|
||||||
.build()
|
.build()
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<network-security-config>
|
<network-security-config>
|
||||||
<domain-config cleartextTrafficPermitted="true">
|
|
||||||
<domain includeSubdomains="true">192.168.0.217</domain>
|
|
||||||
<trust-anchors>
|
|
||||||
<certificates src="system" />
|
|
||||||
<certificates src="@raw/root" /> </trust-anchors>
|
|
||||||
</domain-config>
|
|
||||||
|
|
||||||
<base-config cleartextTrafficPermitted="true">
|
<base-config cleartextTrafficPermitted="true">
|
||||||
<trust-anchors>
|
<trust-anchors>
|
||||||
<certificates src="system" />
|
<certificates src="system" />
|
||||||
|
<certificates src="@raw/root" />
|
||||||
</trust-anchors>
|
</trust-anchors>
|
||||||
</base-config>
|
</base-config>
|
||||||
</network-security-config>
|
</network-security-config>
|
||||||
Loading…
Reference in a new issue