Snippets for http://fagner.co/2014/10/07/CORS-vs-JSONP/
Created
December 28, 2015 02:22
-
-
Save fagnercarvalho/486e2e4765aafc04ecc7 to your computer and use it in GitHub Desktop.
2014-10-07-CORS-vs-JSONP
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
| config.EnableCors(); |
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
| [EnableCors(origins: "http://fagner.azurewebsites.net", headers: "*", methods: "*")] |
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
| processJSON({ 'name': 'Fagner', 'age': '22' }) |
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
| <polymer-jsonp auto url="http://api.bf4stats.com/api/playerInfo?name={{name}}&plat={{platform}}&output=jsonp&opt=names,imagePaths&callback=" | |
| response="{{response}}" on-polymer-response="{{responseHandler}}"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment