Hey Priya,
The custom authentication microflow will not only be applicable for REST post or get method. It will be applicable for entire REST services, so you need to custom authentication over there and under that service whatever methods you configure, that will automatically use custom authentication before actual method microflow gets invoked.
Refer to this article for more understanding -
https://docs.mendix.com/refguide7/published-rest-service/#authentication-microflow
Regards,
Naman Khard