Files
canalhandia/src/main/java/dev/marcospaulo/canalhandia/Fetcher.java
T

15 lines
457 B
Java

package dev.marcospaulo.canalhandia;
import java.io.IOException;
/** The one place the plugin talks to the network, so tests can replace it. */
interface Fetcher {
/** GET a URL, returning the body. */
String get(String url) throws IOException, InterruptedException;
/** POST JSON with a bearer token, returning the body. */
String postJson(String url, String json, String bearer)
throws IOException, InterruptedException;
}