Right now this isn't going to work for you I'm afraid. As the esp8266 page says, there's only very basic support for it, and that is very flaky - I wouldn't be surprised if what is there has got broken in recent builds.
Just to add, this is probably a software problem - at least for now... You could try executing the second function using setTimeout rather than the callback.
If you just want something simple, i'd use the JavaScript ESP8266 driver that's on the forum - it just doesn't have full HTTP support
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Right now this isn't going to work for you I'm afraid. As the esp8266 page says, there's only very basic support for it, and that is very flaky - I wouldn't be surprised if what is there has got broken in recent builds.
Just to add, this is probably a software problem - at least for now... You could try executing the second function using setTimeout rather than the callback.
If you just want something simple, i'd use the JavaScript ESP8266 driver that's on the forum - it just doesn't have full HTTP support