curl
Django Rest Framework Postman Token Authentication
You are setting the header to Authorization: Token when it really should just be Authorization. The header is actually just Authorization, but the value is Token [token_string], where [token_string] is the authorization token that you have obtained.
ansible wget then exec scripts => get_url equivalent
This worked for me: – name: Download zsh installer get_url: url: https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh dest=/tmp/zsh-installer.sh – name: Execute the zsh-installer.sh shell: /tmp/zsh-installer.sh – name: Remove the zsh-installer.sh file: path: /tmp/zsh-installer.sh state: absent
pip: cert failed, but curl works
Unfortunately pip does not use the system certs, but curl does. I found a solution: pip –cert /etc/ssl/certs/FOO_Root_CA.pem install pep8 This is not nice (curl and other libraries find the cert without adding a parameter) but works. If you don’t want to use the command line argument, you can set the cert in ~/.pip/pip.conf: [global] … Read more
Process raw HTTP request
Raw data in, raw data out: nc example.org 80 < raw.http If you need to pipe the data through some program: cat raw.http | someprogram | nc example.org 80 Manual page