Skip to content

Instantly share code, notes, and snippets.

@JorgenRingen
Last active March 15, 2018 12:31
Show Gist options
  • Save JorgenRingen/ca7e9a21ab37ef475e5d730a0f9c3b63 to your computer and use it in GitHub Desktop.
Save JorgenRingen/ca7e9a21ab37ef475e5d730a0f9c3b63 to your computer and use it in GitHub Desktop.
Example of customized httpie launcher that set headers
https://httpie.org/
File that needs to be available and executable on path:
#!/bin/bash
USERID="user-id:AKRF1110"
XAUTHTOKEN="X-Auth-Token:$(cat /tmp/jwttoken.txt)"
http --timeout=9999999 "$@" $USERID $XAUTHTOKEN
Test:
httpa POST :9003/foo data:='{"foo": "bar"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment