Infinit scroll

I m using Capacitor. And when I’m making a request the preflight request is returning me 200 instead of 204, which leads to the exception that is trying to parse a returned HTML which is html tag with the capacitor code inside it. Where I am guessing Capacitor is intercepting my 204 and its not allowing it. Is there a solution? On the browser it works fine.