Golang – Is there a way to send “http” request message using UDP standard functions?
I am trying to work with UDP and Golang. Because my horizons are microcontrollers, where Go packets (TinyGo) are not completely supported, I need to use as minimal amount of packets as possible.
So, I would like to use only the “net” packet, not “net/http”.
Here (with “net”) I can work with UDP using such functions as DialUDP, ListenUDP, ReadToUDP and WriteToUDP. I want to use only them.
I saw many samples of working with UDP in Go, showing how to send “Hello” message, but my question is: Is there a way to prepare a data (probably a slice of bytes) containing an “http request” and send it using the mentioned UDP functions? How to prepare such data?