Re: [go-nuts] Re: Go API receive calls twice when hit through browser

2020-09-27 Thread smartaq...@gmail.com
Thanks a lot. It is working now. After giving the API link it is making the request to the specified one only. Thank you for the help. On Sunday, 27 September 2020 at 22:45:01 UTC+5:30 iko...@gmail.com wrote: > mind: there are more well-known locations, they are just not as common as > the favi

Re: [go-nuts] Re: Go API receive calls twice when hit through browser

2020-09-27 Thread Joop Kiefte
mind: there are more well-known locations, they are just not as common as the favicon call, so you might just want to be specific on where you expect your API calls and only listen on that. [Joop Kiefte - Chat @ Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=pb5kd) [pb5kd]

Re: [go-nuts] Re: Go API receive calls twice when hit through browser

2020-09-27 Thread Joop Kiefte
probably the best solution is to use the handlers and not listen on any other link than your API links, then the favicon request won't hit your service. You don't even really have to return a 200, just make sure you don't answer to favicon.ico requests the very least. [Joop Kiefte - Chat @ Spi

Re: [go-nuts] Re: Go API receive calls twice when hit through browser

2020-09-27 Thread smartaq...@gmail.com
Thank you for the reply. Is there anyway to stop it completely or its the default behavior of all the browsers. It is an api and not any web page due to which adding a meta tag is not possible i think so. I've checked on google, and people are just returning a 200 status, when browser ask for

Re: [go-nuts] Re: Go API receive calls twice when hit through browser

2020-09-25 Thread Joop Kiefte
The browser tries to put a nice icon to the side of the link. Usually this can be accomplished with a meta tag, but the browser also tries the well-known location favicon.ico to retrieve it if there is no meta-tag. That's why you see two requests. [Joop Kiefte - Chat @ Spike](https://spikenow.

[go-nuts] Re: Go API receive calls twice when hit through browser

2020-09-25 Thread gaurav...@gmail.com
First request must be OPTION and second must be GET/ POST , This is default browser behaviour. On Friday, 25 September 2020 at 15:22:27 UTC+5:30 smartaq...@gmail.com wrote: > Team, > > Hi all, hope you are doing good. > > I've made a hosted a small api on my windows 10 enterprise machine: > > `