Eric Jain
unread,Aug 27, 2012, 5:17:28 PM8/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-fr...@googlegroups.com
To increase the default limit (100kb?), I added a maxLength to the controller:
@BodyParser.Of(value = BodyParser.Json.class, maxLength = 1024 * 1024) // 1mb
public static Result post(String id) {
JsonNode node = request().body().asJson(); // null!
...
}
No luck; requests with bodies that are larger than 100kb still return null. The setting does work to reduce the maxLength to less than 100kb, though it's strange that instead of a 400 Bad Request, Play simply returns null for the body. Is that how this is intended to work?
I also added this to the application.conf (wild guess):
parsers.json.maxLength=1mb
Still no luck. Any ideas?