Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Looking at the Play Source code (Play 1.1) at the <code>play.mvc.Http.StatusCode</code> object, Play appears to have the following codes</p> <pre><code>public static final int OK = 200; public static final int CREATED = 201; public static final int ACCEPTED = 202; public static final int PARTIAL_INFO = 203; public static final int NO_RESPONSE = 204; public static final int MOVED = 301; public static final int FOUND = 302; public static final int METHOD = 303; public static final int NOT_MODIFIED = 304; public static final int BAD_REQUEST = 400; public static final int UNAUTHORIZED = 401; public static final int PAYMENT_REQUIERED = 402; public static final int FORBIDDEN = 403; public static final int NOT_FOUND = 404; public static final int INTERNAL_ERROR = 500; public static final int NOT_IMPLEMENTED = 501; public static final int OVERLOADED = 502; public static final int GATEWAY_TIMEOUT = 503; </code></pre> <p>This would indicate acknowledgement of SOME of the codes your have identified, such as 201, 202, 204. However, the values 307, 405, 406, 409, 410 and 415 are not there.</p> <p>Also, 201, 202, 204 are acknowledged, but are not referenced anywhere else within the source code. So unless the Netty server, or one of the supplied jar files is managing these for Play (which I am not sure it can do), I can't see how Play can magically handle these situations without knowing the code base.</p> <p>Looking at the code for renderJSON, it does not appear to set the status code as part of sending the results back (so uses the default 200), so the following hack <em>may</em> work.</p> <pre><code>public static void myJsonAction() { response.status = 201; renderJSON(jsonString); // replace with your JSON String } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload