I am sending large amount of text in the body of post method. I use Postman for testing that. However its working fine and i can read request body like this:
String text = request().body().asText();
But when i try to send large amount of data in the body i get null for the text. I also tried using the string builder but i also get null.
InputStream is = new ByteArrayInputStream(request().body().asText().getBytes());
BufferedReader br = new BufferedReader(new InputStreamReader(is));
Is there a way to get that fixed??
By default Play limits the upload data size to 100kb to text parsers(*). This can be changed to a bigger value globally using
parsers.text.maxLength
inapplication.conf
or in a specific Response or Action using
or
(*) To parsers that buffer content (ex multipart form) the limit is 10MB and can be changed using
parsers.disk.maxLength