http.rst 759 B

123456789101112131415161718192021222324252627282930313233
  1. HTTP API
  2. ========
  3. emqttd support HTTP API to publish message from your application server to MQTT clients. For example::
  4. curl -v --basic -u user:passwd -d "qos=1&retain=0&topic=/a/b/c&message=hello from http..." -k http://localhost:8083/mqtt/publish
  5. HTTP API URL
  6. -----------
  7. ::
  8. HTTP POST http://host:8083/mqtt/publish
  9. HTTP Parameters
  10. ---------------
  11. +---------+-----------------+
  12. | Name | Description |
  13. +-------------------+-------+
  14. | client | ClientId |
  15. +-------------------+-------+
  16. | qos | QoS(0, 1, 2) |
  17. +-------------------+-------+
  18. | retain | Retain(0, 1) |
  19. +-------------------+-------+
  20. | topic | Topic |
  21. +-------------------+-------+
  22. | message | Message |
  23. +-------------------+-------+