You've already forked gobuch-trainingfellow
mirror of
https://github.com/SourceFellows/trainingfellow.git
synced 2025-08-05 22:02:16 +02:00
initial import
This commit is contained in:
30
registrierungclient/cmd/main.go
Normal file
30
registrierungclient/cmd/main.go
Normal file
@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func main() {
|
||||
data := url.Values{
|
||||
"Firstname": {"Peter"},
|
||||
"Lastname": {"Lustig"},
|
||||
"DatenschutzAkzeptiert": {"true"},
|
||||
"Datum": {"2020-10-12"},
|
||||
"Schulungscode": {"GO.EINF"},
|
||||
"Email": {"info@source-fellows.com"},
|
||||
}
|
||||
|
||||
//disable TLS check for local tests
|
||||
tlsConfig := &tls.Config{}
|
||||
tlsConfig.InsecureSkipVerify = true
|
||||
http.DefaultClient.Transport = &http.Transport{TLSClientConfig: tlsConfig}
|
||||
|
||||
res, err := http.PostForm("https://localhost:8443/registrierung", data)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
log.Println(res.Status)
|
||||
}
|
3
registrierungclient/go.mod
Normal file
3
registrierungclient/go.mod
Normal file
@ -0,0 +1,3 @@
|
||||
module training-fellow.de/registrierungclient
|
||||
|
||||
go 1.13
|
Reference in New Issue
Block a user