code: public static void add(HttpString method, String url, HttpConsumer<HttpExchange> endpoint, MediaTypes... mediaTypes) {
          addResource(method, url, endpoint, mediaTypes);
      }
docs: Define a REST endpoint mapped to the specified HTTP method with default path "/" as url
  
  @param method     The HTTP method
  @param url        The relative URL of the endpoint.
  @param endpoint   The endpoint handler
  @param mediaTypes (Optional) The accepted and returned types for this endpoint