/** * @deprecated use {@link Result#cookies()} instead. */ @Deprecated public static Cookies cookies(Result result) { return play.core.j.JavaResultExtractor.getCookies(result); }
/** * @deprecated use {@link Result#flash()} instead. */ @Deprecated public static Flash flash(Result result) { return JavaResultExtractor.getFlash(result); }
/** * @deprecated use {@link Result#headers()} instead. */ @Deprecated public static Map<String, String> headers(Result result) { return JavaResultExtractor.getHeaders(result); }
/** * @deprecated use {@link Result#session()} instead. */ @Deprecated public static Session session(Result result) { return JavaResultExtractor.getSession(result); }
/** * Return a copy of this result with the given headers. * * The headers are processed in pairs, so nameValues(0) is the first header's name, and * nameValues(1) is the first header's value, nameValues(2) is second header's name, * and so on. * * @param nameValues the array of names and values. * @return the transformed copy */ public Result withHeaders(String... nameValues) { return new Result(JavaResultExtractor.withHeader(header, nameValues), body, session, flash, cookies); }
public static byte[] contentAsBytes(Result result, long timeout) { return JavaResultExtractor.getBody(result, timeout); }
/** * Extracts the Status code of this Result value. */ public static int status(Result result) { return play.core.j.JavaResultExtractor.getStatus(result); }
/** * Extracts the Session of this Result value. */ default Session session() { return JavaResultExtractor.getSession(this); }
/** * Return a copy of this result with the given headers. * * The headers are processed in pairs, so nameValues(0) is the first header's name, and * nameValues(1) is the first header's value, nameValues(2) is second header's name, * and so on. * * @param nameValues the array of names and values. * @return the transformed copy */ public Result withHeaders(String... nameValues) { return new Result(JavaResultExtractor.withHeader(header, nameValues), body, session, flash, cookies); }
/** * Extracts the content as bytes. */ public static byte[] contentAsBytes(Result result) { return play.core.j.JavaResultExtractor.getBody(result); }
/** * @deprecated use {@link Result#header(String)} instead. */ @Deprecated public static String header(String header, Result result) { return JavaResultExtractor.getHeaders(result).get(header); }
/** * @deprecated use {@link Result#cookie(String)} instead. */ @Deprecated public static Cookie cookie(String name, Result result) { return JavaResultExtractor.getCookies(result).get(name); }
/** * Extracts the Flash values of this Result value. */ default Flash flash() { return JavaResultExtractor.getFlash(this); }
/** * Extracts the Session of this Result value. */ public static play.mvc.Http.Session session(Result result) { return play.core.j.JavaResultExtractor.getSession(result); }
/** * Return a copy of this result with the given headers. * * The headers are processed in pairs, so nameValues(0) is the first header's name, and * nameValues(1) is the first header's value, nameValues(2) is second header's name, * and so on. * * @param nameValues the array of names and values. * @return the transformed copy */ public Result withHeaders(String... nameValues) { return new Result(JavaResultExtractor.withHeader(header, nameValues), body, session, flash, cookies); }
/** * Extracts all Headers of this Result value. */ default Map<String, String> headers() { return JavaResultExtractor.getHeaders(this); }
/** * Extracts the Cookies (an iterator) from this result value. */ default Cookies cookies() { return play.core.j.JavaResultExtractor.getCookies(this); }
/** * Extracts the Flash values of this Result value. */ public static play.mvc.Http.Flash flash(Result result) { return play.core.j.JavaResultExtractor.getFlash(result); }
/** * Extracts an Header value of this Result value. */ default String header(String header) { return JavaResultExtractor.getHeaders(this).get(header); }
/** * Extracts a Cookie value from this Result value */ default Cookie cookie(String name) { return JavaResultExtractor.getCookies(this).get(name); }