Beispiel #1
0
  /**
   * Tell RestExpress to support XML in routes, incoming and outgoing. By default RestExpress
   * supports XML.
   *
   * @param isDefault true to make XML the default format.
   * @return the RestExpress instance.
   */
  public RestExpress supportXml(boolean isDefault) {
    if (!getResponseProcessors().containsKey(Format.XML)) {
      getResponseProcessors().put(Format.XML, ResponseProcessor.defaultXmlProcessor());
    }

    if (isDefault) {
      setDefaultFormat(Format.XML);
    }

    return this;
  }