The best way to create wifi connection between 2 devices

I'm pretty new and can't figure out how to make a wifi Arduino controller to control another Arduino Board. I don't want to use a bluetooth phone app or web browser. I want to use a joystick that connects.

I want to create a connection so that I can make a joystick controller that connects to the web, and controls the other device that is also connected to the web.

I have UNO, MEGA, NANO, MKR1000, ESP-01, ESP-12, nRFl01... I'm able to get wifi devices connect to my router, but can't figure out how to connect them together so that I can control one with the other.

two esp's can talk to one another over WiFi

one in STA mode connects to another in AP mode, then when sending ,

you normally use

    HTTPClient http;  
 
    http.begin("http:192.168.4.1/data");  // IP of receiving end goes here

    int httpCode = http.GET();

upon receiving you invoke

server.on("/data", []()

KASSIMSAMJI:
two esp's can talk to one another over WiFi

one in STA mode connects to another in AP mode, then when sending ,

you normally use

    HTTPClient http;  

http.begin("http:192.168.4.1/data");  // IP of receiving end goes here

int httpCode = http.GET();




upon receiving you invoke 



server.on("/data",

with HTTP overhead it would be a very slow joystick control