summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/main.go b/main.go
index 63b978f..6a51539 100644
--- a/main.go
+++ b/main.go
@@ -50,7 +50,7 @@ func get_course_ids(canvas_courses []CanvasCourse) []uint64 {
50 return courses 50 return courses
51} 51}
52 52
53// parseForm extracts form fields and values from the given HTML form string. 53// parse_form extracts form fields and values from the given HTML form string.
54func parse_form(form_html string) url.Values { 54func parse_form(form_html string) url.Values {
55 form_values := make(url.Values) 55 form_values := make(url.Values)
56 inputs := strings.Split(form_html, "<input") 56 inputs := strings.Split(form_html, "<input")
@@ -152,6 +152,13 @@ func main() {
152 for key, values := range form_values { 152 for key, values := range form_values {
153 fmt.Printf("%s: %s\n", key, values) 153 fmt.Printf("%s: %s\n", key, values)
154 } 154 }
155
156 //req, err := http.PostForm("https://floridapoly.aplusattendance.com/canvas", form_values)
157 req, err := client.PostForm("https://floridapoly.aplusattendance.com/canvas", form_values)
158 body, err = io.ReadAll(req.Body)
159
160 fmt.Println(string(body))
161 fmt.Println(req)
155} 162}
156 163
157/* 164/*