mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-13 06:53:19 -05:00
Returns the body in string format
This commit is contained in:
parent
4bf6b45f2f
commit
4acb527ec8
@ -1393,6 +1393,14 @@ public class HTTPServer {
|
|||||||
* @return the input stream containing the request body
|
* @return the input stream containing the request body
|
||||||
*/
|
*/
|
||||||
public InputStream getBody() { return body; }
|
public InputStream getBody() { return body; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the body in a String format
|
||||||
|
*/
|
||||||
|
public String getJson(){
|
||||||
|
java.util.Scanner s = new java.util.Scanner(body).useDelimiter("\\A");
|
||||||
|
return s.hasNext() ? s.next() : "";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the path component of the request URI, after
|
* Returns the path component of the request URI, after
|
||||||
|
Loading…
Reference in New Issue
Block a user