POST Method.
convert Integer to String and put Temper Data to https server.
54 func PostData(Temp int) {
55 tr := &http.Transport{
56 TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
57 }
58 client := &http.Client{Transport: tr}
59
60 resp, err := client.PostForm(
61 "https://☆☆☆☆.asp",
62 url.Values{"☆☆": {strconv.Itoa(Temp)},
63 "☆☆": {"☆☆"},
64 })
65 body, err := ioutil.ReadAll(resp.Body)
66 resp.Body.Close()
67
68 fmt.Println(string(body), err)
69 }
0 件のコメント:
コメントを投稿