@Test public void testXml() throws Exception { Result result = Results.ok("hello").xml(); assertThat(result.getContentType()).isEqualTo(MimeTypes.XML); assertThat(result.getCharset()).isEqualTo(Charsets.UTF_8); }
public static Result xml() { return status(Result.OK).as(MimeTypes.XML); }
Results { public static Result xml() { return status(Result.OK).as(MimeTypes.XML); } }
Results { public static Result xml() { return status(Result.OK).as(MimeTypes.XML); }  }
Results { public static Result xml() { return status(Result.OK).as(MimeTypes.XML); }  static Result status(int statusCode); static Result ok(); static Result ok(Document document); static Result ok(JsonNode node); static Result ok(Object object); static Result ok(URL object); static Result ok(InputStream object); static Result ok(byte[] bytes); static Result ok(byte[] bytes, boolean chunked); static Result ok(String object); static Result ok(String padding, JsonNode node); static Result ok(Result result); static Result notFound(); static Result notFound(String content); static Result notFound(Result result); static Result notFound(Renderable<?> renderable); static Result forbidden(); static Result forbidden(Result result); static Result forbidden(String content); static Result unauthorized(); static Result unauthorized(Result result); static Result unauthorized(String content); static Result badRequest(); static Result badRequest(Result result); static Result badRequest(Object object); static Result badRequest(String content); static Result noContent(); static Result internalServerError(); static Result internalServerError(Throwable e); static Result internalServerError(String content); static Result internalServerError(Renderable<?> renderable); static Result redirect(String url); static Result redirectTemporary(String url); static Result html(); static Result json(); static Result xml(); static Result todo(); static Result ok(File file, boolean attachment); static Result ok(File file); static AsyncResult async(Callable<Result> task); }
Results { public static Result xml() { return status(Result.OK).as(MimeTypes.XML); }  static Result status(int statusCode); static Result ok(); static Result ok(Document document); static Result ok(JsonNode node); static Result ok(Object object); static Result ok(URL object); static Result ok(InputStream object); static Result ok(byte[] bytes); static Result ok(byte[] bytes, boolean chunked); static Result ok(String object); static Result ok(String padding, JsonNode node); static Result ok(Result result); static Result notFound(); static Result notFound(String content); static Result notFound(Result result); static Result notFound(Renderable<?> renderable); static Result forbidden(); static Result forbidden(Result result); static Result forbidden(String content); static Result unauthorized(); static Result unauthorized(Result result); static Result unauthorized(String content); static Result badRequest(); static Result badRequest(Result result); static Result badRequest(Object object); static Result badRequest(String content); static Result noContent(); static Result internalServerError(); static Result internalServerError(Throwable e); static Result internalServerError(String content); static Result internalServerError(Renderable<?> renderable); static Result redirect(String url); static Result redirectTemporary(String url); static Result html(); static Result json(); static Result xml(); static Result todo(); static Result ok(File file, boolean attachment); static Result ok(File file); static AsyncResult async(Callable<Result> task);  }