To connect to a miner using CommuneX, you can simply use the ModuleClient class. It would look like this:
If you don't want to use python to make your requests, you can implement your own client as you wish, but some particularities needs to be followed:
timestamp is the ISO timestamp of your request, target_key is the ss58address of the miner that your request is directed at. params is the actual data that the miner expects on the endpoint. This json should be signed to create a SR25519 signature that You're going to put on the X-Signature header. X-Crypto is the type of cryptography of your key (currently only SR25519 is supported) and X-Key is the hexstring of your public key.