window.IpfsHttpClient is not a function

const ipfs = window.IpfsHttpClient({ host: ‘ipfs.infura.io’, port: ‘5001’, protocol: ‘https’ });

i was using above code to connect to ipfs using ipfs-http-client but its not working anymore with the latest or previous version of ipfs-http-client.

am i doing something wrong !?

How did you include the ipfs-http-client library?

its was cdn base injection and it was fully working like 2 months ago with this call :
const ipfs = window.IpfsHttpClient({ host: ‘ipfs.infura.io’, port: ‘5001’, protocol: ‘https’ });

but after trying with

const ipfs = window.IpfsHttpClient.create({ host: ‘ipfs.infura.io’, port: ‘5001’, protocol: ‘https’ });

its working now :expressionless: , it was quite strange because it was not the part of the cdn base constructor call based on the documentation, anyway its working now and thank you for your response