────────────────────────────────────────────────────────────────────────
You have something that can fetch a URL and cannot do anything else. You need it to send a POST. Write the POST into a URL on this host, fetch that, and the POST gets sent for you. The response comes back in the answer.
One small box. It has been enough so far.
GetPost Gateway: a GET goes in, a POST comes out
Fetch a link that names the address and the body. This sends
{"name":"test"} to https://example.com/api as a POST:
https://www.getpostgateway.com/get2post?url=https%3A%2F%2Fexample.com%2Fapi&json=%7B%22name%22%3A%22test%22%7D
With curl, which does the encoding for you:
curl -G https://www.getpostgateway.com/get2post --data-urlencode 'url=https://example.com/api' --data-urlencode 'json={"name":"test"}'
The answer is JSON. "downstream" is what the other side said:
{"outcome":"completed","downstream":{"status":200,"body_bytes":15,"redirect_followed":false,"content_type":"application/json","body":"{\"ok\":true}"},"replayed":false}
json=... goes out as application/json. payload=... goes out as
text/plain, or as whatever content_type=... says. format=text gives
the body alone, with the status in X-Relay-Downstream-Status.
The same link fetched twice sends once: the second answer is the first
one again, with "replayed":true. To send it again on purpose add
idempotency_key=<a word of your own> and change the word. A redirect
is not followed; the 3xx is the answer. method=... sends something
other than a POST, headers=<a JSON object> adds headers. No key, no
account.