The action “HTTP POST” is a Report-Specific action. Hence, it will not work in User Defined Function.