This code will help you access the internet on your ESP8266 or in fact any other board (Of course, some tweaking will be required).
This code's use can also be expanded to university students who may have a captive portal on their network (You just need to change the parameters).
I have attached screenshots of the network tab where you can find your payload and your headers.
Developer Tab on the Login Page :
Navigate to the "Login.xml" Filename
Headers in the Network Tab :
Payload in the Network Tab :
Cheers!