diff options
Diffstat (limited to 'extras/appengine/static/sqlformat_client_example.py')
| -rw-r--r-- | extras/appengine/static/sqlformat_client_example.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extras/appengine/static/sqlformat_client_example.py b/extras/appengine/static/sqlformat_client_example.py index 3b3bf0f..e4d1606 100644 --- a/extras/appengine/static/sqlformat_client_example.py +++ b/extras/appengine/static/sqlformat_client_example.py @@ -3,6 +3,9 @@ import urllib import urllib2 +REMOTE_API = 'http://sqlformat.appspot.com/format/' +REMOTE_API = 'http://127.0.0.1:8080/format/' + payload = ( ('data', 'select * from foo join bar on val1 = val2 where id = 123;'), ('format', 'text'), @@ -11,7 +14,7 @@ payload = ( ('n_indents', 2), ) -response = urllib2.urlopen('http://sqlformat.appspot.com/format/', +response = urllib2.urlopen(REMOTE_API, urllib.urlencode(payload)) print response.read() |
