From 311291ae58fd6baae47fff7b1efd8c47c102c25c Mon Sep 17 00:00:00 2001
From: Andi Albrecht
Using the API for this application is pretty simple. Just send a
-
- The POST request to
+ request to
http://sqlformat.appspot.com/format/
@@ -15,9 +15,10 @@
Options
POST request accepts various options to control
- formatting. Only the data option is required. All others
- are optional.
+ The server accepts various options to control formatting. Only
+ the data option is required. All others are optional.
+ Either use GET and pack the options in the query string
+ or POST and submit your parameters as form data.
@@ -49,4 +50,15 @@
Download sqlformat_example_client.py
+ And another example using curl and a GET request:
+
+$ curl "http://localhost:8080/format?keyword_case=upper&reindent=true&data=select%20*%20from%20foo;"
+SELECT *
+FROM foo;
+$
+