Migrate README to Emacs verb

verb is a much better tool than restclient.
This commit is contained in:
Andreas Zweili 2024-04-03 18:37:25 +02:00
parent d1e98f4d5e
commit 3da135878f
1 changed files with 4 additions and 39 deletions

View File

@ -8,10 +8,9 @@ This project was inspired by Snappass and was previously licensed under MIT.
- https://github.com/pinterest/snappass
** Tests
** Tests :verb:
#+name: mycontent
#+begin_src restclient
*** Store secret
POST http://localhost:8000
Accept: application/json
Content-Type: application/json
@ -20,46 +19,12 @@ Content-Type: application/json
"ttl": 604800,
"password": "Foo"
}
#+end_src
#+RESULTS: mycontent
#+BEGIN_SRC js
{
"key": "snappass448b8e2a34174c20a2e636f14e99f836~c85WYn1KjFtqpTVqYifHuQxvjhBTp0gF0W3fk4Z1oXc="
}
// POST http://localhost:8000
// HTTP/1.1 200 OK
// Server: gunicorn
// Date: Fri, 29 Dec 2023 17:12:27 GMT
// Connection: close
// Content-Type: application/json
// Content-Length: 101
// Request duration: 0.093294s
#+END_SRC
#+begin_src restclient
*** Retrieve secret
POST http://localhost:8000/get-secret
Accept: application/json
Content-Type: application/json
{
"key": "snappass448b8e2a34174c20a2e636f14e99f836~c85WYn1KjFtqpTVqYifHuQxvjhBTp0gF0W3fk4Z1oXc="
"key": "snappass941ad23f9e4b4e7fa699854e48f83ff9~tQVYlz56h1bzXVlrCY5W8rYER1sXGtvYtRHrMyXLhSc="
}
#+end_src
#+RESULTS:
#+BEGIN_SRC js
{
"password": "Foo"
}
// POST http://localhost:8000/get-secret
// HTTP/1.1 200 OK
// Server: gunicorn
// Date: Fri, 29 Dec 2023 17:12:36 GMT
// Connection: close
// Content-Type: application/json
// Content-Length: 24
// Request duration: 0.052981s
#+END_SRC