
io.github.stewseo.client.transport.Endpoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yelp-fusion-client Show documentation
Show all versions of yelp-fusion-client Show documentation
java client to build api objects, handle http transport, and parse/deserialize/serialize json to/from json
package io.github.stewseo.client.transport;
import io.github.stewseo.client.json.JsonpDeserializer;
import java.util.Collections;
import java.util.Map;
// //An endpoint links requests and responses to HTTP protocol encoding.
// It also defines the error response when the server cannot perform the request.
public interface Endpoint {
String id();
String method(RequestT request);
String requestUrl(RequestT request);
default Map queryParameters(RequestT request) {
return Collections.emptyMap();
}
default Map headers(RequestT request) {
return Collections.emptyMap();
}
boolean hasRequestBody();
boolean isError(int statusCode);
JsonpDeserializer errorDeserializer(int statusCode);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy