We don't really support hidden Wi-Fi networks.
The connection test actually performs a standard http request over port 80 to a pre-defined URL. The Internet Request action simply executes a standard request. IFTTT and Spotify Web Connect also connect to various https endpoint on their servers. So, as long as the firewall allows TCP traffic over port 80 and 443, it should work. Of course a DNS server (the one assigned by the DHCP server) at UDP port 53 must also be able to be reached, assuming you use domain names instead of raw IP addresses.
@martinm When an incoming FIN packet is received from the remote endpoint, the socket is automatically properly closed unless the allowHalfOpen option is set. If that option is set, the socket is properly closed at the time when both an incoming FIN has been received and the local user has called the end method on the socket (in any order). Nothing is done at garbage collection time, so if you use the allowHalfOpen property, remember to close the socket by calling the end method. If the allowHalfOpen is not set, you can still use the end method to send your own FIN packet.