See https://github.com/matomo-org/developer-documentation/pull/246 and as suggested in https://github.com/matomo-org/developer-documentation/pull/246#discussion_r191085822 removing the example from the Matomo repository as well.
Regarding a reason not to use HTTP requests, is there potentially an issue w/ using outgoing HTTP requests on shared hosting? (I don't know if there is, but when thinking about why this code exists, the thought came up that there might be.)
Possible that a server isn't connected to the internet, but as this example is executed on the same Matomo server, it should still be able to at least connect to itself I would say. Otherwise HTTP requests itself should work. Not sure what the reason is. It was mentioned in the docs regarding resources, but HTTP doesn't take many resources (maybe was valid 8-10 years ago IDK)
Yeah, I'm not sure what resources it would take up either. And if there is a performance issue w/ using HTTP requests, we should optimize that use case instead of creating another solution that has to be supported. 👍 to remove
And if there is a performance issue w/ using HTTP requests, we should optimize that use case instead of creating another solution that has to be supported.
It should do pretty much the same logic anyway. I think the reference was to the resources of an HTTP request itself. But HTTP itself really doesn't take any resources basically and it is very fast.