B4J Question jServer parse JSON from http request body

Damjan

Member
Hi,

How to get json from http message body. I need to listen for messages from client. Client is sending REST requests to defined address (http://127.0.0.1:8888/event-listener) and every message contain json data in body.

How could I extract and decode json from body of the message.

B4X:
Sub Handle(req As ServletRequest, resp As ServletResponse)
   
    ...extract json from req

End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…