mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deploy website
Deploy website version based on feee16183f9cdb8be62a656f6a2c3fba467828a7
This commit is contained in:
+9
-6
@@ -169,12 +169,15 @@ YellowBox.ignoreWarnings([<span class="hljs-string">'Warning: ...'</span>]);
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">addInterceptor</span><span class="hljs-params">()</span> </span>{
|
||||
OkHttpClient client = OkHttpClientProvider.getOkHttpClient()
|
||||
.newBuilder()
|
||||
.addNetworkInterceptor(<span class="hljs-keyword">new</span> StethoInterceptor())
|
||||
.build();
|
||||
|
||||
OkHttpClientProvider.replaceOkHttpClient(client);
|
||||
<span class="hljs-keyword">final</span> OkHttpClient baseClient = OkHttpClientProvider.createClient();
|
||||
OkHttpClientProvider.setOkHttpClientFactory(<span class="hljs-keyword">new</span> OkHttpClientFactory() {
|
||||
<span class="hljs-meta">@Override</span>
|
||||
<span class="hljs-function"><span class="hljs-keyword">public</span> OkHttpClient <span class="hljs-title">createNewNetworkModuleClient</span><span class="hljs-params">()</span> </span>{
|
||||
<span class="hljs-keyword">return</span> baseClient.newBuilder()
|
||||
.addNetworkInterceptor(<span class="hljs-keyword">new</span> StethoInterceptor())
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</code></pre></li>
|
||||
|
||||
Reference in New Issue
Block a user