public class HttpApi
public HttpApi(@NotNull java.net.URL root, @NotNull com.fasterxml.jackson.databind.ObjectMapper mapper)
public void putJson(@NotNull java.lang.String path, @NotNull java.lang.Object data)
Send a PUT with a payload to the path on the API specified.
data
- String values are assumed to be valid JSON. All other values will be mapped to JSON.public void postJson(@NotNull java.lang.String path, @NotNull java.lang.Object data)
Send a POST with a payload to the path on the API specified.
data
- String values are assumed to be valid JSON. All other values will be mapped to JSON.public void postPlain(@NotNull java.lang.String path, @NotNull java.lang.String data)
Send a POST with a payload to the path on the API specified.
data
- String payload@NotNull public java.net.URL getRoot()
@NotNull public com.fasterxml.jackson.databind.ObjectMapper getMapper()