func addKongConsumer(consumer string) { | |
resp, err := http.PostForm(KongURL+"consumers/", url.Values{"username": {consumer}, "custom_id": {consumer}}) | |
if err != nil { | |
color.R.Printf(err.Error()) | |
} else { | |
_, err := ioutil.ReadAll(resp.Body) | |
if err != nil { | |
color.R.Printf(err.Error()) | |
} | |
color.G.Printf("Add Consumer with name %s\n", consumer) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment