An infographic · gettopost.io

GetToPost.io

From GET to POST in one link

Made for a meetup talk. People kept using the demo, so it stayed up.

How a GET becomes a POST

1

Step 1 of 4

Write your link

Put the address you want to reach, and what you want to send, into one ordinary link.

2

Step 2 of 4

Fetch it

Open it from anywhere that can only do a plain GET: a browser, a script, a tiny device.

3

Step 3 of 4

We send the POST

The relay makes the real request for you, with the method and headers you asked for.

4

Step 4 of 4

The answer comes home

Whatever the other side says is handed straight back to you. Free, no account, no key.

Step 5 · Your turn

The recipe

GetToPost.io: From GET to POST in one link

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://gettopost.io/api/relay?url=https://example.com/api&body=%7B%22name%22%3A%22test%22%7D

With curl, which does the encoding for you:

    curl -G https://gettopost.io/api/relay --data-urlencode 'url=https://example.com/api' --data-urlencode 'body={"name":"test"}'

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

    https://gettopost.io/api/relay?url=https://example.com/api/7&method=DELETE
    https://gettopost.io/api/relay?url=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.

Reaches public http and https addresses. Sends POST and other methods, and takes custom headers.

Step 6 · See for yourself

Try it yourself




Sources

Sources: coming soon

GetToPost.io · gettopost.io · Back to top