MCPcopy Create free account
hub / github.com/FongMi/TV / fetch

Method fetch

app/src/main/java/com/fongmi/android/tv/player/extractor/Strm.java:21–26  ·  view source on GitHub ↗
(String url)

Source from the content-addressed store, hash-verified

19 }
20
21 @Override
22 public String fetch(String url) throws Exception {
23 if (url.startsWith("http")) return http(url);
24 if (url.startsWith("file")) url = url.substring(7);
25 return Path.read(new File(url)).split("\\R", 2)[0];
26 }
27
28 private String http(String url) throws Exception {
29 try (Response res = OkHttp.newCall(OkHttp.noRedirect(), url).execute()) {

Callers

nothing calls this directly

Calls 5

httpMethod · 0.95
readMethod · 0.95
splitMethod · 0.80
startsWithMethod · 0.45
substringMethod · 0.45

Tested by

no test coverage detected