Init commit; pssecret-server collection

This commit is contained in:
Ivan Golikov 2025-01-06 17:13:59 +01:00
commit 63f74677df
7 changed files with 1221 additions and 0 deletions

View file

@ -0,0 +1,2 @@
name: Retrieve secret
url: http://localhost:8000/secret/$last_secret_key

View 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)

View 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