Closed bharath-c closed 7 years ago
Hi @bharath-c
to implement an Application Logic you need to implement the mehtod
public void handleRequest(HttpServerExchange exchange, RequestContext context)
The RequestContext object allows you to get the input body with the method public BsonValue getContent()
Thanks for ur reply. I had done same but Im getting null pointer exception. Message body is {"data":"restheart"} Pls guide
this helped me. StringWriter writer = new StringWriter(); IOUtils.copy(exchange.getInputStream(), writer); String payLoad = writer.toString();
Anyways thanks a lot.
HI, I was trying to extend restheart with ApplicationLogicHandler clas. in handleRequest i wanted to parse POST method. But i couldnt find any function to fetch message body data. Im not sure if that a bug or intended functionality. Sorry if Im posting in wrong forum.