Init commit; pssecret-server collection
This commit is contained in:
commit
63f74677df
7 changed files with 1221 additions and 0 deletions
2
pssecret-server/retrieve-secret.posting.yaml
Normal file
2
pssecret-server/retrieve-secret.posting.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Retrieve secret
|
||||
url: http://localhost:8000/secret/$last_secret_key
|
8
pssecret-server/scripts/store-secret-data.py
Normal file
8
pssecret-server/scripts/store-secret-data.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
import httpx
|
||||
from posting import Posting
|
||||
|
||||
|
||||
def on_response(response: httpx.Response, posting: Posting) -> None:
|
||||
key = response.json()["key"]
|
||||
print(f"Setting '$last_secret_key' to {key}")
|
||||
posting.set_variable("last_secret_key", key)
|
14
pssecret-server/store-secret-data.posting.yaml
Normal file
14
pssecret-server/store-secret-data.posting.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
name: Store secret data
|
||||
method: POST
|
||||
url: http://localhost:8000/secret
|
||||
body:
|
||||
content: |-
|
||||
{
|
||||
"data": "my-secret"
|
||||
}
|
||||
content_type: application/json
|
||||
headers:
|
||||
- name: content-type
|
||||
value: application/json
|
||||
scripts:
|
||||
on_response: scripts/store-secret-data.py
|
Loading…
Add table
Add a link
Reference in a new issue