private void addBodyToContext ( final String body ) { if ( ! body . isEmpty ( ) ) { final JSONParser parser = new JSONParser ( ) ; try { final JSONObject json = ( JSONObject ) parser . parse ( body ) ; context . put ( "requestBody" , json ) ; } catch ( final ParseException e ) { e . printStackTrace ( ) ; } } }
Adds the request body to the context if one exists .