Add option to choose payload encoding when manually publishing a message from the Management UI.
The HTTP management API already supports publishing binary messages by encoding them in base64, but this feature is not exposed to the frontend. This change adds a new field to the message publishing form that allows the user to send base64-encoded messages right from the Management UI.
This commit is contained in:
parent
ea284ce47e
commit
fb81ae057a
|
|
@ -1064,7 +1064,6 @@ function publish_msg(params0) {
|
|||
|
||||
function publish_msg0(params) {
|
||||
var path = fill_path_template('/exchanges/:vhost/:name/publish', params);
|
||||
params['payload_encoding'] = 'string';
|
||||
params['properties'] = {};
|
||||
params['properties']['delivery_mode'] = parseInt(params['delivery_mode']);
|
||||
if (params['headers'] != '')
|
||||
|
|
|
|||
|
|
@ -60,6 +60,15 @@
|
|||
<th><label>Payload:</label></th>
|
||||
<td><textarea name="payload"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label>Payload encoding:</label></th>
|
||||
<td>
|
||||
<select name="payload_encoding">
|
||||
<option value="string" selected>String (default)</option>
|
||||
<option value="base64">Base64</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" value="Publish message" />
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue