12345678910111213141516 |
- package main
- import (
- "log"
- "net/http"
- "net/url"
- )
- // https://zetcode.com/golang/getpostrequest/ post_req_form.go
- func Post(where string, data *url.Values) *http.Response {
- resp, err := http.PostForm(where, *data)
- if err != nil {
- log.Fatalf("POST got non 200 code, %v", err)
- }
- return resp
- }
|