Created
May 31, 2014 17:57
-
-
Save mgroves/10daca27288df6c7f35a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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