You don't need to care about doing manually the GetFeatureInfo manually. Instead use the identify method from QgsRasterDataProvider class (https://qgis.org/api/classQgsRasterDataProvider.html#a5b033a4ab93593c8378af8005ed52ccd)
wmsLayer = iface.activeLayer()
# Change with your coordinates
ident = wmsLayer.dataProvider().identify(QgsPointXY(693135,6803672), QgsRaster.IdentifyFormatFeature)
You can look at ident.results() and the features
print(ident.results()[0][0].features())
To see one feature from the getfeatureinfo behind the scene
fields = [f.name() for f in ident.results()[0][0].features()[0].fields()]
attributes = ident.results()[0][0].features()[0].attributes()
print(dict(zip(fields, attributes)))
Edit:
As you may need to reproject coordinates from canvas to WMS layer projection, you can use the following
canvas_crs = iface.mapCanvas().mapSettings().destinationCrs()
wms_crs = iface.activeLayer().crs()
pointXY = QgsPointXY(4.2745, 47.7904)
tr = QgsCoordinateTransform(canvas_crs, wms_crs, QgsProject.instance())
geom = QgsGeometry.fromPointXY(pointXY)
geom.transform(tr)
print(geom.asPoint())
PS: adapted from more generic answer https://gis.stackexchange.com/a/163689/638