Skip to content

Commit

Permalink
description
Browse files Browse the repository at this point in the history
  • Loading branch information
otdftr authored Feb 6, 2024
1 parent 71b8e3b commit aac55eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mqttwarn/services/http_urllib.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

def plugin(srv, item):
""" addrs: (method, url, dict(params), list(username, password), json)
or (shorthand)
addrs: (method, url, list(params), list(username, password), json) """
or (shorthand for quoted fields)
addrs: (method, url, list(param_names), list(username, password), json) """

srv.logging.debug("*** MODULE=%s: service=%s, target=%s", __file__, item.service, item.target)

Expand Down Expand Up @@ -73,7 +73,8 @@ def plugin(srv, item):
# Quoted field, starts with '@'. Do not use .format, instead grab
# the item's [message] and inject as parameter value.
# { 'x' : '?param' }
# optional quoted field, add to query string only if it exists in item's data and is not empty
# Optional quoted field, add to query string only if it exists
# in item's data and is not empty
if params[key].startswith('@'): # "@message"
params[key] = item.get(params[key][1:], "NOP")

Expand Down

0 comments on commit aac55eb

Please sign in to comment.