File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ echo -e "github.com\none.one.one.one\ngoogle-public-dns-a.google.com" | curl "ht
8686]
8787```
8888
89- - Response is a JSON array (Content-Type: application/json).
89+ - Response is a JSON array (` Content-Type: application/json ` ).
9090- Each element in the array:
9191 - Is a result of a query
9292 - Has an "in" fields which is an array of the input params (a request body line).
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import (
1414 _ "github.com/mattn/go-sqlite3"
1515)
1616
17+ const version = "1.0.0"
18+
1719var db * sql.DB
1820var queryStmt * sql.Stmt
1921
@@ -70,6 +72,8 @@ func main() {
7072}
7173
7274func query (w http.ResponseWriter , r * http.Request ) {
75+ w .Header ().Set ("Server" , "SQLiteQueryServer v" + version )
76+
7377 if r .URL .Path != "/query" {
7478 http .Error (w , helpMessage , http .StatusNotFound )
7579 return
You can’t perform that action at this time.
0 commit comments