-1

I am trying to do simple http post request using the following code: Golang code from another Stack Overflow post

It's sending the http request twice (I tried both to my own web service and also to the Firebase messaging server).

2
  • If you are using that exact code, then the request will not be sent twice; you must be executing it twice. Commented Apr 13, 2017 at 13:21
  • 1
    ...Unless the server returned a Location header, then the HTTP client will follow the redirect. Commented Apr 13, 2017 at 13:23

1 Answer 1

1

The cause was AVG anti virus. There was nothing in the console log indicating any part of the program was run twice. I move from Firebase messaging server to my own webserver to remove external dependency, and even read the source in net/http package.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.