We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when trying example i get error.
this is due to firefox being a json browser and the examples are returning plain/text but saying they are returning json.
writer.Header().Set("Content-Type", "application/json") q := request.URL.Query() query := q.Get("q") if query != "" { var ( ast *parser.SelectTree ) p := &parser.Parser{} if p.GetSQLType(query) != parser.SELECT { _, _ = fmt.Fprintf(writer, "not a SELECT statement") return }
for all the error printing lines, this will fix;
example; http.Error(writer, "not a SELECT statement", http.StatusBadRequest) from _, _ = fmt.Fprintf(writer, "not a SELECT statement")
http.Error(writer, "not a SELECT statement", http.StatusBadRequest)
_, _ = fmt.Fprintf(writer, "not a SELECT statement")
but the data written will also have to be converted to json.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
when trying example i get error.
this is due to firefox being a json browser and the examples are returning plain/text but saying they are returning json.
for all the error printing lines, this will fix;
example;
http.Error(writer, "not a SELECT statement", http.StatusBadRequest)
from
_, _ = fmt.Fprintf(writer, "not a SELECT statement")
but the data written will also have to be converted to json.
The text was updated successfully, but these errors were encountered: