Skip to content

Instantly share code, notes, and snippets.

@mossprescott
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save mossprescott/68d4af6b2b5b06ab4c9f to your computer and use it in GitHub Desktop.

Select an option

Save mossprescott/68d4af6b2b5b06ab4c9f to your computer and use it in GitHub Desktop.
Simple test for query request with Destination header
<html>
<head>
<title>Simple CORS test</title>
<script type="text/javascript">
var req = new XMLHttpRequest()
// req.open("GET", "http://localhost:8080/metadata/fs/", true)
req.open("GET", "http://localhost:8080/query/fs/?q=select+*+from+zips+limit+10", true)
req.send()
// req.open("POST", "http://localhost:8080/query/fs/", true)
// req.setRequestHeader("Destination", "/tmp/out")
// req.send("select city from zips limit 10")
// req.open("MOVE", "http://localhost:8080/data/fs/foo/bar", true)
// req.setRequestHeader("Destination", "/tmp/out")
// req.send()
</script>
</head>
<body>
Nothing to see here. See the JavaScript console for results.
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment