Enable SPI for Http modules (#602)
This commit is contained in:
Родитель
3908667ac8
Коммит
d8f2c843cc
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
package com.azure.android.core.http.httpurlconnection;
|
||||
|
||||
import com.azure.android.core.http.HttpClient;
|
||||
import com.azure.android.core.http.HttpClientProvider;
|
||||
|
||||
/**
|
||||
* An {@link HttpClientProvider} that provides an implementation of HttpClient based on HttpUrlConnection.
|
||||
*/
|
||||
public class HttpUrlConnectionAsyncHttpClientProvider implements HttpClientProvider {
|
||||
@Override
|
||||
public HttpClient createInstance() {
|
||||
return new HttpUrlConnectionAsyncHttpClientBuilder().build();
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
com.azure.core.http.okhttp.implementation.OkHttpClientProvider
|
||||
com.azure.android.core.http.httpurlconnection.HttpUrlConnectionAsyncHttpClientProvider
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
package com.azure.android.core.http.okhttp;
|
||||
|
||||
import com.azure.android.core.http.HttpClient;
|
||||
import com.azure.android.core.http.HttpClientProvider;
|
||||
|
||||
/**
|
||||
* An {@link HttpClientProvider} that provides an implementation of HttpClient based on OkHttp.
|
||||
*/
|
||||
public final class OkHttpAsyncClientProvider implements HttpClientProvider {
|
||||
@Override
|
||||
public HttpClient createInstance() {
|
||||
return new OkHttpAsyncHttpClientBuilder().build();
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
com.azure.core.http.okhttp.implementation.OkHttpClientProvider
|
||||
com.azure.android.core.http.okhttp.OkHttpAsyncClientProvider
|
||||
|
|
Загрузка…
Ссылка в новой задаче