I need to send data via http protocol (GET or POST request) from the function or trigger. Is it possible?
Any "untrusted" language with HTTP support can do this:
but you shouldn't really do it. See Does PLV8 support making http calls to other servers? and why you shouldn't send email from a trigger function.