Isn't it literally playing it via curl though - curl reads STDIN and transmits that to the server, which responds. The whole bash thing is completely optional and only saves you some tty setup.