Migrate README to Emacs verb
verb is a much better tool than restclient.
This commit is contained in:
parent
d1e98f4d5e
commit
3da135878f
43
README.org
43
README.org
|
@ -8,10 +8,9 @@ This project was inspired by Snappass and was previously licensed under MIT.
|
||||||
|
|
||||||
- https://github.com/pinterest/snappass
|
- https://github.com/pinterest/snappass
|
||||||
|
|
||||||
** Tests
|
** Tests :verb:
|
||||||
|
|
||||||
#+name: mycontent
|
*** Store secret
|
||||||
#+begin_src restclient
|
|
||||||
POST http://localhost:8000
|
POST http://localhost:8000
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
@ -20,46 +19,12 @@ Content-Type: application/json
|
||||||
"ttl": 604800,
|
"ttl": 604800,
|
||||||
"password": "Foo"
|
"password": "Foo"
|
||||||
}
|
}
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+RESULTS: mycontent
|
*** Retrieve secret
|
||||||
#+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
|
|
||||||
POST http://localhost:8000/get-secret
|
POST http://localhost:8000/get-secret
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: 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
|
|
||||||
|
|
Loading…
Reference in New Issue