Skip to content

Commit 92a7da6

Browse files
authored
Merge pull request #69 from splunk/dev/MP/use-post-instead-of-get
Use POST instead of GET for search/jobs/export API call
2 parents 78ccda3 + af6b7b8 commit 92a7da6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

python/stail.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
# under the License.
1616

1717
"""Tails a realtime search using the export endpoint and prints results to
18-
stdout."""
18+
stdout."""
1919

2020
import sys
2121
import os
22+
2223
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lib"))
2324

2425
from pprint import pprint
@@ -40,13 +41,14 @@ def main():
4041
service = connect(**opts.kwargs)
4142

4243
try:
43-
result = service.get(
44+
result = service.post(
4445
"search/jobs/export",
4546
search=search,
4647
earliest_time="rt",
4748
latest_time="rt",
4849
search_mode="realtime",
49-
output_mode="json")
50+
output_mode="json",
51+
)
5052
print(result.body)
5153

5254
for result in JSONResultsReader(result.body):

0 commit comments

Comments
 (0)