io.github.stewseo.client.transport.endpoints.BooleanEndpoint Maven / Gradle / Ivy
package io.github.stewseo.client.transport.endpoints;
import io.github.stewseo.client.json.JsonpDeserializer;
import java.util.Map;
import java.util.function.Function;
public class BooleanEndpoint extends SimpleEndpoint {
public BooleanEndpoint(
String id,
Function method,
Function requestUrl,
Function> queryParameters,
Function> headers,
boolean hasRequestBody,
JsonpDeserializer> responseParser // always null
) {
super(id, method, requestUrl, queryParameters, headers, hasRequestBody, null);
}
@Override
public boolean isError(int statusCode) {
return statusCode >= 500;
}
public boolean getResult(int statusCode) {
return statusCode < 400;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy