Add support for specifying URI
Add support for specifying URI for nodes to which the mqtt-http plugin sends HTTP messages converted from MQTT.
E.g.
If we add the stream_route below, http messages are sent to http://127.0.0.1:8001/pass/to/test
.
$ curl http://127.0.0.1:9180/apisix/admin/stream_routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"server_addr": "127.0.0.1",
"server_port": 9100,
"plugins": {
"mqtt-http": {
"protocol_version": 4,
"uri": "/pass/to/test"
}
},
"upstream": {
"type": "roundrobin",
"nodes": [{
"host": "127.0.0.1",
"port": 8001,
"weight": 1
}]
}
}'
Edited by Takashi Hashida