Http post issue when calling REST API

I have a very simple GO program which is calling a REST API and posting this message to Slack Channel.

Whenever the REST API is taking longer time to respond. The Go Application is posting the REST API again.

Is there a setting which i need to update for the GO Application to wait and not trigger the REST API again?

This is how I am calling the REST API:

jsonValue, _ := json.Marshal(jvalues)
response, err := http.Post(“http://posturl”, “application/json”, bytes.NewBuffer(jsonValue))

Go version: go1.13.6 darwin/amd64

Has anyone faced this issue before

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.