Skip to content

Instantly share code, notes, and snippets.

@alexdiliberto
Created July 17, 2015 20:02
Show Gist options
  • Save alexdiliberto/e374791d250ba2dd1f19 to your computer and use it in GitHub Desktop.
Save alexdiliberto/e374791d250ba2dd1f19 to your computer and use it in GitHub Desktop.
# 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