I am using the Grape framework to retrieve data, which is working great. I would also like to retrieve a JavaScript file using the API. For example:
<!DOCTYPE html>
<html>
<head>
<script defer src="http://someapi.com/dni_js/dni.js" > </script>
</head>
<body>
</body>
</html>
http://someapi.com/dni_js/dni.js is calling the API.
What would be the best way to accomplish this?
You should implement support for JSONP in your API.