sendJson method

void sendJson (String destination, dynamic message, { Map<String, String> headers })

Sends a JSON message.

  • stomp.send("/foo", {"type": 1, "data": ["abc"]});
    
  • Note: it sets the content-length and content-type header automatically
  • if not specified (default content-type: application/json).
    • message - the message. It must be a JSON object (including null).
  • In other words, it must be able to jsonized into a JSON string.

Implementation

void sendJson(String destination, message, {Map<String, String> headers});