Calling irsend.sendSony() with url parameteres ESP8266WebServer

So I've been struggling with this for a few hours now. Been programming for quite a few years, but never in such a low-level language as C++. As the title suggest, I'm trying to make something happen, via HTTP Requests. My setup is with a NodeMCU. The code I currently have is as follows:

server.on("/", [](){
    int data = server.arg("data").toInt();
    int bits = server.arg("bits").toInt();
    irsend.sendSony(data, bits);
    server.send(200, "text/plain", "Request Recieved");
  });

I started off sending the 'data' as hex value, but ran into a few problems sending it to sendSony() as a hex value. That's why I'm sending it as an int now. Hope this is enough info to go from

What are you seeing? What do you expect to see? How are they different? Incomplete snippets of code rarely provide enough context

what objectirsend.sendSony(data, bits); from what class ? from what library ?