trying to switch input on my speakers via infrared using web browser but i have issue getting it working
Look at your code. You set up the sender, define the data and then never use it:

server.on("/on", []() {   //Define the handling function for the path
    server.send(200, "text / plain", "Switching to USB input");
    #define IR_LED D3  
    IRsend irsend(IR_LED);  // Set the GPIO to be used to sending the message.
    uint16_t rawData[71] = {8992, 4494,  574, 558,  572, 558,  574, 558,  574, 558,  574, 558,  572, 558,  572, 556,  572, 1660,  572, 1658,  574, 1658,  574, 1658,  574, 1660,  574, 1660,  574, 1660,  574, 1658,  602, 528,  574, 558,  574, 1658,  576, 556,  574, 556,  574, 1660,  574, 556,  574, 554,  574, 554,  574, 1658,  574, 556,  574, 1656,  576, 1658,  576, 556,  574, 1658,  576, 1656,  576, 1658,  576, 39978,  8994, 2256,  578};
    irsend.begin();

  });


You need to add a call to irsend.SendRaw() to actually send the data - otherwise you didn't actually do anything.

So your code would look like:

server.on("/on", []() {   //Define the handling function for the path
    server.send(200, "text / plain", "Switching to USB input");
    #define IR_LED D3  
    IRsend irsend(IR_LED);  // Set the GPIO to be used to sending the message.
    uint16_t rawData[71] = {8992, 4494,  574, 558,  572, 558,  574, 558,  574, 558,  574, 558,  572, 558,  572, 556,  572, 1660,  572, 1658,  574, 1658,  574, 1658,  574, 1660,  574, 1660,  574, 1660,  574, 1658,  602, 528,  574, 558,  574, 1658,  576, 556,  574, 556,  574, 1660,  574, 556,  574, 554,  574, 554,  574, 1658,  574, 556,  574, 1656,  576, 1658,  576, 556,  574, 1658,  576, 1656,  576, 1658,  576, 39978,  8994, 2256,  578};
    irsend.begin();

    irsend.sendRaw(rawData, 71, KHZ);
  });


You'll need to replace KHZ with the frequency the remote you're trying to replicate uses, otherwise it still won't work.