xref: /curl/docs/MQTT.md (revision 86d33001)
1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3
4SPDX-License-Identifier: curl
5-->
6
7# MQTT in curl
8
9## Usage
10
11A plain "GET" subscribes to the topic and prints all published messages.
12Doing a "POST" publishes the post data to the topic and exits.
13
14Example subscribe:
15
16    curl mqtt://host.home/bedroom/temp
17
18Example publish:
19
20    curl -d 75 mqtt://host.home/bedroom/dimmer
21
22## What does curl deliver as a response to a subscribe
23
24It outputs two bytes topic length (MSB | LSB), the topic followed by the
25payload.
26
27## Caveats
28
29Remaining limitations:
30 - Only QoS level 0 is implemented for publish
31 - No way to set retain flag for publish
32 - No TLS (mqtts) support
33 - Naive EAGAIN handling does not handle split messages
34