blob: 505436eaf44a4d2297b3f11be1dc019cb58f6ed7 [file] [log] [blame]
package com.airbnb.lottie.network;
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
@RestrictTo(RestrictTo.Scope.LIBRARY)
public class DefaultLottieNetworkFetcher implements LottieNetworkFetcher {
@Override
@NonNull
public LottieFetchResult fetchSync(@NonNull String url) throws IOException {
final HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
connection.setRequestMethod("GET");
connection.connect();
return new DefaultLottieFetchResult(connection);
}
}