Created
July 17, 2015 20:02
-
-
Save alexdiliberto/e374791d250ba2dd1f19 to your computer and use it in GitHub Desktop.
Test the --proxy function of Ember CLI - https://github.com/ember-cli/ember-cli/issues/3432#issuecomment-103205057
This file contains 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
# Set up a listener | |
nc -l 1234 | |
# spawn ember-cli that proxies to the listener | |
ember s --proxy http://localhost:1234 | |
# curl "as ajax" | |
curl -H 'X-Requested-With: XMLHttpRequest' -H 'Accept: application/json' localhost:4200/api/foo | |
#result in the listener tab: | |
$ nc -l 1234 | |
GET /api/foo HTTP/1.1 | |
accept: application/json | |
x-requested-with: XMLHttpRequest | |
referer: | |
host: localhost:1234 | |
user-agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) | |
connection: close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment