Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created May 31, 2014 17:57
Show Gist options
  • Select an option

  • Save mgroves/10daca27288df6c7f35a to your computer and use it in GitHub Desktop.

Select an option

Save mgroves/10daca27288df6c7f35a to your computer and use it in GitHub Desktop.
<script language="JScript" runat="server" src="/Scripts/json2.js"></script>
<%
dim url
url = "http://yoururl/jsonendpoint"
Set HttpReq = Server.CreateObject("MSXML2.ServerXMLHTTP")
HttpReq.open "POST", url, false
HttpReq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
HttpReq.Send("Foo=bar")
'use json2 via jscript to parse the response
Set myJSON = JSON.parse(HttpReq.responseText)
response.write myJSON.Name & "<br />"
response.write myJSON.Address & "<br />"
response.write myJSON.ShoeSize & "<br />"
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment