getpost.sh

GET now, POST later (about 200 ms later)

mirek k.

lightning talks, 2013

1 / 7getpost.sh · lightning talk

The problem

2 / 7getpost.sh · lightning talk
DEMO (if the wifi works)
3 / 7getpost.sh · lightning talk

How to use it

getpost.sh: GET now, POST later (about 200 ms later)

Put the address and the body in a link and fetch it. This POSTs
{"name":"test"} to https://example.com/api and gives you whatever
example.com answered, status code and headers included:

    https://getpost.sh/relay?target=https://example.com/api&body=%7B%22name%22%3A%22test%22%7D

With curl, which does the encoding for you:

    curl -G https://getpost.sh/relay --data-urlencode 'target=https://example.com/api' --data-urlencode 'body={"name":"test"}'

Something other than a POST, or with headers of your own:

    https://getpost.sh/relay?target=https://example.com/api/7&method=DELETE
    https://getpost.sh/relay?target=https://example.com/api/7&method=PUT&body=name%3Dnew&headers=%7B%22Authorization%22%3A%22Bearer%20abc%22%7D

headers is a JSON object, here {"Authorization":"Bearer abc"}. A body
that is JSON goes out as application/json, a=1&b=2 as a form, anything
else as text; content_type=... says otherwise. Add response=json to
get the answer wrapped in an object with "status", "headers" and
"body". http and https only. Redirects are followed. No key, no
account.
4 / 7getpost.sh · lightning talk

Try it

Example: https://getpost.sh/relay?target=https://example.com/api&body=%7B%22name%22%3A%22test%22%7D




5 / 7getpost.sh · lightning talk

Questions?

Slides from a five-minute talk. The demo on slide 4 is real.

contact: TODO

6 / 7getpost.sh · lightning talk