HTTPError: ipfs method not allowed

I am using infura ipfs node https://ipfs.infura.io:5001/ for publishing my hash in ipns and get peer ID. I get an issue every time saying ipfs method not allowed.

I then ran ipfs daemon locally and try to perform the same ipns action and it worked. What is going on with infura ipfs node?

Be sure to use a POST HTTP header, not a GET

The public gateway may also only be running a read-only API and doesn’t support uploading files.

I am using the official doc but problem persists