Permalink
Browse files

Backup #4

Signed-off-by: DhilipSiva Bijju <dhilipsiva@gmail.com>
  • Loading branch information...
1 parent 50f9116 commit c2bc8a018f1d9022a7bc7e532cd3b958b26c1497 @dhilipsiva committed Feb 23, 2013
Showing with 31 additions and 1 deletion.
  1. +2 −0 .gitconfig
  2. +1 −1 .vimrc
  3. +28 −0 debug_rest_client.py
View
@@ -13,3 +13,5 @@
trustExitCode = true
[push]
default = matching
+[branch]
+ autosetuprebase = always
View
2 .vimrc
@@ -17,7 +17,7 @@ let g:netrw_sort_sequence='\.py$,\.conf$' "Sort sequence
filetype off
-"autocmd BufWritePost *.py call Flake8() "apply flake8 as files are saved
+autocmd BufWritePost *.py call Flake8() "apply flake8 as files are saved
autocmd BufWritePre *.py :%s/\s\+$//e "Trim the line endings
syntax on
View
@@ -0,0 +1,28 @@
+'''
+A simple flask script to print the
+request info. useful for dubugging your
+rest client.
+
+dhilipsiva@gmail.com
+
+'''
+from flask import Flask, request
+
+app = Flask(__name__)
+
+
+@app.route('/', defaults={'path': ''})
+@app.route('/<path:path>')
+def hello(path):
+ app.logger.debug(path)
+ app.logger.debug(request.headers)
+ app.logger.debug(request.args)
+ app.logger.debug(request.form)
+ return 'hello'
+
+
+if __name__ == "__main__":
+ app.run(
+ host="0.0.0.0",
+ port=8888,
+ debug=True)

0 comments on commit c2bc8a0

Please sign in to comment.