Skip to content

Instantly share code, notes, and snippets.

@dthapa
dthapa / javascript_http.html
Last active August 29, 2015 13:57
A simple Javascript/HTML script used to access ES APIs, both GET and POST. Replace code with your api key and input.
<!--
A simple Javascript/HTML script demonstrating GET and POST calls.
Can also adjust to Http/Https request
Download and load the in either Chrome or Firefox and follow the instructions.
The examples demonstrate one "CORS" API and one that isn't.
-->
<html>
<head>
<script>
function http_request(url, method, post_data){