Skip to content

Instantly share code, notes, and snippets.

@orbanbotond
Last active January 4, 2016 15:42
Show Gist options
  • Save orbanbotond/58fc65a4e11d5e961b64 to your computer and use it in GitHub Desktop.
Save orbanbotond/58fc65a4e11d5e961b64 to your computer and use it in GitHub Desktop.
Usefull tricky Unix commands
Ok:
curl --include \
--request POST \
--header "Content-Type: application/json" \
--header "Authorization: 2c84ba63636d9555ee4dba8a610e704b5d1f8a1133179dec6ba9450f6ee4457ee0ae450672d3c7e6fcdce00a84ba73f4d5a403adb7677e9750ba68e5f00450d9" \
--data-binary "{ \"token\": \"522aa06304052ff5a98cb482fb3a089a97c217fc3298d43146ebe65c2f8b65ac\", \"location\": \"New York\", \"participants\": [ {\"id\": 4} ], \"guests\": [ {\"email\": \"[email protected]\", \"first_name\": \"Johny\", \"last_name\": \"Cage\" } ]}" \
'http://localhost:3000/api/v1/meetings/xx'
Ok:
curl -v \
'http://localhost:3000/api/v1/meetings/xx' \
-H 'Authorization: 2c84ba63636d9555ee4dba8a610e704b5d1f8a1133179dec6ba9450f6ee4457ee0ae450672d3c7e6fcdce00a84ba73f4d5a403adb7677e9750ba68e5f00450d9' \
-F token=522aa06304052ff5a98cb482fb3a089a97c217fc3298d43146ebe65c2f8b65ac
curl -H "Authorization: 2c84ba63636d9555ee4dba8a610e704b5d1f8a1133179dec6ba9450f6ee4457ee0ae450672d3c7e6fcdce00a84ba73f4d5a403adb7677e9750ba68e5f00450d9" -F preferences%5B%5D%5Bkey%5D=jeijj -F preferences%5B%5D%5Bkey%5D=yeiyy -F preferences%5B%5D%5Bvalue%5D=11 -F preferences%5B%5D%5Bvalue%5D=13 http://localhost:3000/api/v1/array_param/array_values
curl -v -H 'Authorization: cec5a50f0e17d66492b80751a8a28e68' -F token=a5420995f0a19977e794da9939a1b12f -F group_id=1 -F message='Hw' -F media_time_limit=2 -F media=@./spec/fixtures/images/test_avatar.jpg local.caesars.com:3000/api/messages.json
curl -v -H 'Authorization: cec5a50f0e17d66492b80751a8a28e68' -F token=a5420995f0a19977e794da9939a1b12f -F group_id=1 -F message='Hw' -F media_time_limit=2 -F media=@./spec/fixtures/images/test_avatar.jpg local.caesars.com:3000/api/messages.json
curl -v -X DELETE -F token=875e9e615a6c044b0140e6a9e3ab41f8 -F product_id=1 -H 'Authorization: bdc4c1f1f146996ae057eda269be4346' local.caesars.com:3000/api/itinerary.json
curl -v -X GET -H 'Authorization: bdc4c1f1f146996ae057eda269be4346' -F token=363edd5d961a56285b11679f720b056e -F group_id=1 -F before=2 http://local.caesars.com:3000/api/messages.json
curl -v -H 'Authorization: FFFF' -F token=9aa5aa79442480f2a55e9ed278bbf724 -F use_social_identity_avatar=yes 'http://local.caesars.com:3000/api/me/avatar.json'
{"status":true}
curl -v -H 'Authorization: FFFF' -F token=9aa5aa79442480f2a55e9ed278bbf724 -F use_social_identity_avatar=no -F avatar=@./spec/fixtures/images/test_avatar.jpg 'http://local.caesars.com:3000/api/me/avatar.json'
{"status":true}
curl -v -H 'Authorization: FFFF' -F token=9aa5aa79442480f2a55e9ed278bbf724 -F use_social_identity_avatar=no 'http://local.caesars.com:3000/api/me/avatar.json'
curl -v -H 'Authorization: FFFF' -F token=51221e79dace4161c78982beb53c2582 -F review_id=40 -F media=@./spec/fixtures/images/test_avatar.jpg 'https://dime.encore.io/api/review/40/images.json'
curl -v -H 'Authorization: FFFF' -F event_id=1 -F group_size=12 -F name=Boti -F [email protected] -F phone=061273 'http://local.instadium.com:3000/api/redeems/2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment