summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manager.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/manager.go b/manager.go
index 086740e..2029552 100644
--- a/manager.go
+++ b/manager.go
@@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"io"
+ "io/ioutil"
"net/http"
"os"
"strings"
@@ -83,20 +84,12 @@ func (hi *HTTPInput) httphandler(w http.ResponseWriter, r *http.Request) {
fmt.Printf("Expected POST method was: %q\n", r.Method)
return
}
- err := r.ParseForm()
+ all, err := ioutil.ReadAll(r.Body)
if err != nil {
- fmt.Printf("Error when parsing HTTP request form values: %q\n", err)
+ fmt.Printf("Error when reading HTTP request body: %q\n", err)
return
}
- workdata := r.PostForm["work"]
- fmt.Printf("Form %#v\n", r.Form)
- if workdata == nil {
- fmt.Printf("Work form field was empty.\n")
- return
- }
-
- fmt.Printf("Work form field was: %q\n", workdata)
- hi.retchan <- &Work{data: []byte(workdata[0])}
+ hi.retchan <- &Work{data: all}
}
func (hi *HTTPInput) Start() chan *Work {