Search code examples
restdemo

How to demo a REST API without a REST client


I need to build a way to demo a REST API that takes three or four inputs, makes a REST call to an external server, then displays the response. This demo needs to be performed by a rather limited technical audience to business so REST clients are out.

It seemed like a simple HTML page that would do an ajax call would be fine for this, except I ran into the No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access fun messages because my localhost domain does not match the target domain. I don't have access to the target REST web service, so I can't make the necessary changes for the CORS headers.

Any ideas?


Solution

  • Build a very small and simple web application that shows the same HTML but does the REST call with its own REST client and shows the results. Then run that on a local server.