Skip to content

Instantly share code, notes, and snippets.

@madis
Created January 15, 2013 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madis/4542301 to your computer and use it in GitHub Desktop.
Save madis/4542301 to your computer and use it in GitHub Desktop.
```bash
# Make a POST request with post parameter
# -i for showing headers
# -d for passing post parameters
curl -i -d "site_key=almost_random" -X POST http://localhost:3001/api/visits
# Save a cookie in a file
curl -c visits_cookie.txt -d "site_key=almost_random" -X POST http://localhost:3001/api/visits
# Make a POST request with cookie
# -b for passing the cookie
curl -b visits_cookie.txt -d "site_key=almost_random" -X POST http://localhost:3001/api/visits
# Check a redis key from command line
redis-cli get visit_session:2d2066db-78f3-43f4-b38c-47ce258751bc
# Deletes redis key
redis-cli get visit_session:2d2066db-78f3-43f4-b38c-47ce258751bc
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment