Skip to content

Commit 01813e7

Browse files
authored
Merge pull request #331 from warrenvw/master
Document core.http basic authentication parameters
2 parents 477c8c6 + 064b365 commit 01813e7

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

docs/source/actions.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,13 @@ executed from the |st2| box:
659659

660660
st2 run core.http url="http://httpbin.org/get" method="GET"
661661

662+
Similar to cURL, this action supports basic authentication when provided a username
663+
and password:
664+
665+
::
666+
667+
st2 run core.http url="http://httpbin.org/get" method="GET" username=user1 password=pass1
668+
662669
To see all actions in the ``core`` pack:
663670

664671
::

docs/source/start.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ Fire the POST, check out the file and see that it appends the payload if the nam
212212
# And for fun, same post with st2
213213
st2 run core.http method=POST body='{"you": "too", "name": "st2"}' url=https://localhost/api/v1/webhooks/sample headers='x-auth-token=put_token_here;content-type=application/json' verify_ssl_cert=False
214214
215+
# And for even more fun, same post with st2 using basic authentication
216+
st2 run core.http method=POST body='{"you": "too", "name": "st2"}' url=https://localhost/api/v1/webhooks/sample headers='content-type=application/json' verify_ssl_cert=False username=user1 password=pass1
217+
215218
# Check that the rule worked. By default, st2 runs as the stanley user.
216219
sudo tail /home/stanley/st2.webhook_sample.out
217220

0 commit comments

Comments
 (0)