Aufgabenstellung

Praktikumsaufgabe 4, Gruppe 7. Der Dienst läuft noch, weil ihn niemand abgeschaltet hat.

Die Aufgabe war ein kleiner Dienst, der aus einer HTTP-GET-Anfrage eine POST-Anfrage macht: ein Client, der nur GET sprechen kann, ruft eine Adresse ab, und der Dienst schickt daraus einen POST (oder ein anderes Verfahren) an das eigentliche Ziel und gibt dessen Antwort zurück. Der Dienst ist kostenlos, braucht weder Konto noch Schlüssel, erlaubt eigene Header und erreicht öffentliche http- und https-Adressen.

Benutzung

Die folgende Beschreibung ist absichtlich auf Englisch gehalten, damit sie unverändert von Programmen gelesen werden kann:

GetToPost Net: Aus einem GET wird ein POST

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

With curl, which does the encoding for you:

    curl -G https://www.gettopost.net/send --data-urlencode 'url=https://example.com/api' --data-urlencode 'data={"name":"test"}'

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

    https://www.gettopost.net/send?url=https://example.com/api/7&method=DELETE
    https://www.gettopost.net/send?url=https://example.com/api/7&method=PUT&data=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.

https://www.gettopost.net/send?url=https://example.com/api&data=%7B%22name%22%3A%22test%22%7D

Ausprobieren




Bekannte Probleme

  • Sehr große Antworten werden langsam übertragen; ein Timeout bricht die Anfrage nach einiger Zeit ab.
  • Der Bericht (PDF) ist zur Zeit nicht verlinkt – wird nachgereicht.
Stand: 12.02.2004 · gettopost.net · Diese Seite wird nicht mehr gepflegt.