Skip to content

Commit

Permalink
Fix GET parameter handling
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Apr 14, 2023
1 parent ae86443 commit 3eb2980
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions quackpipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ func main() {

// handle query parameter
if r.URL.Query().Get("query") != "" {
query = r.Form.Get("query")
// query = r.FormValue("query")
query = r.URL.Query().Get("query")
} else if r.Body != nil {
bodyBytes, err = ioutil.ReadAll(r.Body)
if err != nil {
Expand Down Expand Up @@ -345,7 +346,7 @@ func main() {
}
})

fmt.Printf("API Running: %s:%s\n", *appFlags.Host, *appFlags.Port)
fmt.Printf("QuackPipe API Running: %s:%s\n", *appFlags.Host, *appFlags.Port)
if err := http.ListenAndServe(*appFlags.Host+":"+*appFlags.Port, nil); err != nil {
panic(err)
}
Expand Down

0 comments on commit 3eb2980

Please sign in to comment.