mirror of
https://codeberg.org/flpolyaplus/aplus.git
synced 2024-11-21 17:00:30 -05:00
add postform request
This commit is contained in:
parent
c411ee3447
commit
410a8c7f18
9
main.go
9
main.go
@ -50,7 +50,7 @@ func get_course_ids(canvas_courses []CanvasCourse) []uint64 {
|
||||
return courses
|
||||
}
|
||||
|
||||
// parseForm extracts form fields and values from the given HTML form string.
|
||||
// parse_form extracts form fields and values from the given HTML form string.
|
||||
func parse_form(form_html string) url.Values {
|
||||
form_values := make(url.Values)
|
||||
inputs := strings.Split(form_html, "<input")
|
||||
@ -152,6 +152,13 @@ func main() {
|
||||
for key, values := range form_values {
|
||||
fmt.Printf("%s: %s\n", key, values)
|
||||
}
|
||||
|
||||
//req, err := http.PostForm("https://floridapoly.aplusattendance.com/canvas", form_values)
|
||||
req, err := client.PostForm("https://floridapoly.aplusattendance.com/canvas", form_values)
|
||||
body, err = io.ReadAll(req.Body)
|
||||
|
||||
fmt.Println(string(body))
|
||||
fmt.Println(req)
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user