Skip to content

Commit 10836d9

Browse files
committed
Edited Stanza.submit
Edited the doc strings for Stanza.submit. I am saying raw strings are deprecated--correct?
1 parent 720bbc3 commit 10836d9

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

splunklib/client.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,16 +1690,17 @@ class Stanza(Entity):
16901690
"""This class contains a single configuration stanza."""
16911691

16921692
def submit(self, stanza):
1693-
"""Sets the keys in *stanza* on this Stanza.
1694-
1695-
*stanza* will usually be a dictionary of key/value pairs, but can also
1696-
by a raw string to send as the POST body of the request (e.g.,
1697-
`"key=some+value&other+key=another+value"`). Sending raw strings should
1698-
be considered deprecated.
1699-
1700-
:param stanza: A dictionary of key/value pairs to set in this stanza.
1693+
"""Adds keys to the current configuration stanza as a
1694+
dictionary of key-value pairs.
1695+
1696+
*stanza* can also be a raw string to send as the POST body of the
1697+
request (for example, `"key=some+value&other+key=another+value"`).
1698+
However, you should avoid sending raw strings because this feature has
1699+
been deprecated.
1700+
1701+
:param stanza: A dictionary of key-value pairs for the stanza.
17011702
:type stanza: ``dict``
1702-
:return: The :class:`Stanza` object this method is called on.
1703+
:return: The :class:`Stanza` object.
17031704
"""
17041705
if isinstance(stanza, str):
17051706
message = { 'method': "POST", 'body': stanza }

0 commit comments

Comments
 (0)